Appearance
Moderation
About 6435 wordsAbout 21 min
Swift SDK - Chat API
Table of Contents
- appeal
- getAppeal
- queryAppeals
- ban
- upsertConfig
- getConfig
- deleteConfig
- queryModerationConfigs
- flag
- mute
- queryReviewQueue
- submitAction
- Types Reference
appeal
Submit a request to challenge a moderation decision if you believe it was incorrect or unfair, helping to ensure accurate content moderation.
Example
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.appeal(
request: .init(
appealReason: "example_value",
entityID: "example_value",
entityType: "example_value",
attachments: ["value1", "value2"]
)
)
print(response)Response: AppealResponse
Parameters
Request Body:
appealReason(String) (required): Explanation for why the content is being appealedattachments([String]): Array of Attachment URLs(e.g., images)entityID(String) (required): Unique identifier of the entity being appealedentityType(String) (required): Type of entity being appealed (e.g., message, user)
getAppeal
Retrieve details of a specific appeal you have submitted, allowing you to track the status and outcome of the appeal process.
Example
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.getAppeal(
id: "example-id"
)
print(response)Response: GetAppealResponse
Parameters
Path Parameters:
id(String) (required)
queryAppeals
Search and list submitted appeals based on specific criteria, enabling you to manage and review multiple appeals efficiently.
Example
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.queryAppeals(
request: .init(
filter: [:],
limit: 1
)
)
print(response)Response: QueryAppealsResponse
Parameters
Request Body:
filter([String: Any]): Filter conditions for appealslimit(Int)next(String)prev(String)sort([SortParamRequest]): Sorting parameters for appeals
ban
Use this method to prohibit a user from accessing your service due to violations, ensuring a safe and respectful environment.
Example
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.ban(
request: .init(
targetUserID: "john",
bannedBy: "example_value",
bannedByID: "example_value"
)
)
print(response)Response: BanResponse
Parameters
Request Body:
bannedBy(UserRequest): Details about the user performing the banbannedByID(String): ID of the user performing the banchannelCid(String): Channel where the ban appliesdeleteMessages(String)ipBan(Bool): Whether to ban the user's IP addressreason(String): Optional explanation for the banshadow(Bool): Whether this is a shadow bantargetUserID(String) (required): ID of the user to bantimeout(Int): Duration of the ban in minutes
upsertConfig
Create a new or update an existing moderation policy configuration to tailor content review processes to your specific needs.
Example
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.upsertConfig(
request: .init(
key: "example_value",
aiImageConfig: "example_value",
aiTextConfig: "example_value"
)
)
print(response)Response: UpsertConfigResponse
Parameters
Request Body:
aiImageConfig(AIImageConfig): Configuration for AI image analysisaiTextConfig(AITextConfig): Configuration for AI text analysisaiVideoConfig(AIVideoConfig): Configuration for AI video analysisasync(Bool): Whether moderation should be performed asynchronouslyautomodPlatformCircumventionConfig(AutomodPlatformCircumventionConfig): Configuration for platform circumvention detectionautomodSemanticFiltersConfig(AutomodSemanticFiltersConfig): Configuration for semantic filteringautomodToxicityConfig(AutomodToxicityConfig): Configuration for toxicity detectionawsRekognitionConfig(AIImageConfig)blockListConfig(BlockListConfig): Configuration for block list filteringbodyguardConfig(AITextConfig)googleVisionConfig(GoogleVisionConfig): Configuration for Google Vision integrationkey(String) (required): Unique identifier for the moderation configurationllmConfig(LLMConfig): Configuration for customer-configured LLM moderationruleBuilderConfig(RuleBuilderConfig): Configuration for custom rule builder (max 3 rules, max 5 conditions per rule)team(String): Team associated with the configurationvelocityFilterConfig(VelocityFilterConfig): Configuration for velocity-based filteringvideoCallRuleConfig(VideoCallRuleConfig)
getConfig
Access the current moderation configuration settings to review or audit how content moderation is being conducted.
Example
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.getConfig(
key: "example_value"
)
print(response)Response: GetConfigResponse
Parameters
Path Parameters:
key(String) (required)
Query Parameters:
team(String)
deleteConfig
Remove a specific moderation policy to discontinue its application, allowing for policy updates or changes in moderation strategy.
Example
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.deleteConfig(
key: "example_value"
)
print(response)Response: DeleteModerationConfigResponse
Parameters
Path Parameters:
key(String) (required)
Query Parameters:
team(String)
queryModerationConfigs
Search and retrieve a list of all moderation configurations, offering visibility into the rules and policies currently in effect.
Example
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.queryModerationConfigs(
request: .init(
filter: [:],
limit: 1
)
)
print(response)Response: QueryModerationConfigsResponse
Parameters
Request Body:
filter([String: Any]): Filter conditions for moderation configslimit(Int)next(String)prev(String)sort([SortParamRequest]): Sorting parameters for the results
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
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.flag(
request: .init(
entityID: "example_value",
entityType: "example_value",
custom: [:],
entityCreatorID: "example_value"
)
)
print(response)Response: FlagResponse
Parameters
Request Body:
custom([String: Any]): Additional metadata about the flagentityCreatorID(String): ID of the user who created the flagged entityentityID(String) (required): Unique identifier of the entity being flaggedentityType(String) (required): Type of entity being flagged (e.g., message, user)moderationPayload(ModerationPayload): Content being flaggedreason(String): Optional explanation for why the content is being flagged
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
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.mute(
request: .init(
targetIds: ["id-1", "id-2"],
timeout: 1
)
)
print(response)Response: MuteResponse
Parameters
Request Body:
targetIds([String]) (required): User IDs to mute (if multiple users)timeout(Int): Duration of mute in minutes
queryReviewQueue
Access a list of content items waiting for moderation review. Use this method to manage and prioritize pending moderation tasks efficiently.
Example
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.queryReviewQueue(
request: .init(
filter: [:],
limit: 1
)
)
print(response)Response: QueryReviewQueueResponse
Parameters
Request Body:
filter([String: Any]): Filter conditions for review queue itemslimit(Int)lockCount(Int): Number of items to lock (1-25)lockDuration(Int): Duration for which items should be lockedlockItems(Bool): Whether to lock items for review (true), unlock items (false), or just fetch (nil)next(String)prev(String)sort([SortParamRequest]): Sorting parameters for the resultsstatsOnly(Bool): Whether to return only statistics
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
import StreamChat
let config = ChatClientConfig(apiKeyString: "<your_api_key>")
let client = ChatClient(config: config)
let userInfo = UserInfo(id: "john", name: "John")
try await client.connectUser(userInfo: userInfo, token: .development(userId: "john"))
let response = try await client.moderation.submitAction(
request: .init(
actionType: "example_value",
appealID: "example_value",
ban: "example_value"
)
)
print(response)Response: SubmitActionResponse
Parameters
Request Body:
actionType(String) (required): Type of moderation action to perform. One of: mark_reviewed, delete_message, delete_activity, delete_comment, delete_reaction, ban, custom, unban, restore, delete_user, unblock, block, shadow_block, unmask, kick_user, end_call, escalate, de_escalateappealID(String): UUID of the appeal to act on (required for reject_appeal, optional for other actions)ban(BanActionRequestPayload): Configuration for ban actionblock(BlockActionRequestPayload): Configuration for block actionbypass(BypassActionRequest): Configuration for bypass moderation actioncustom(CustomActionRequestPayload): Configuration for custom actiondeleteActivity(DeleteActivityRequestPayload): Configuration for activity deletion actiondeleteComment(DeleteCommentRequestPayload): Configuration for comment deletion actiondeleteMessage(DeleteMessageRequestPayload): Configuration for message deletion actiondeleteReaction(DeleteReactionRequestPayload): Configuration for reaction deletion actiondeleteUser(DeleteUserRequestPayload): Configuration for user deletion actionescalate(EscalatePayload): Configuration for escalation actionflag(FlagRequest): Configuration for flag actionitemID(String): UUID of the review queue item to act onmarkReviewed(MarkReviewedRequestPayload): Configuration for marking item as reviewedrejectAppeal(RejectAppealRequestPayload): Configuration for rejecting an appealrestore(RestoreActionRequestPayload): Configuration for restore actionshadowBlock(ShadowBlockActionRequestPayload): Configuration for shadow block actionunban(UnbanActionRequestPayload): Configuration for unban actionunblock(UnblockActionRequestPayload): Configuration for unblock action
Types Reference
This section documents the types/interfaces used in this API. These types are extracted from the OpenAPI specification.
AIImageConfig
struct AIImageConfig {
var async: Bool?
var enabled: Bool
var ocrRules: [OCRRule]
var rules: [AWSRekognitionRule]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | Bool | Yes | |
| ocr_rules | [OCRRule] | Yes | |
| rules | [AWSRekognitionRule] | Yes | |
| async | Bool | No |
AITextConfig
struct AITextConfig {
var async: Bool?
var enabled: Bool
var profile: String
var rules: [BodyguardRule]
var severityRules: [BodyguardSeverityRule]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | Bool | Yes | |
| profile | String | Yes | |
| rules | [BodyguardRule] | Yes | |
| severity_rules | [BodyguardSeverityRule] | Yes | |
| async | Bool | No |
AIVideoConfig
struct AIVideoConfig {
var async: Bool?
var enabled: Bool
var rules: [AWSRekognitionRule]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | Bool | Yes | |
| rules | [AWSRekognitionRule] | Yes | |
| async | Bool | No |
AWSRekognitionRule
struct AWSRekognitionRule {
var action: String /* flag | shadow | remove | bounce | bounce_flag | bounce_remove */
var label: String
var minConfidence: Double
var subclassifications: [String: Any]?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | String /* flag | shadow | remove |
| label | String | Yes | |
| min_confidence | Double | Yes | |
| subclassifications | [String: Any] | No |
Action
struct Action {
var name: String
var style: String?
var text: String
var type: String
var value: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| name | String | Yes | |
| text | String | Yes | |
| type | String | Yes | |
| style | String | No | |
| value | String | No |
AppealItemResponse
struct AppealItemResponse {
var appealReason: String
var attachments: [String]?
var createdAt: Double
var decisionReason: String?
var entityContent: ModerationPayload?
var entityID: String
var entityType: String
var id: String
var status: String
var updatedAt: Double
var user: UserResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| appeal_reason | String | Yes | Reason Text of the Appeal Item |
| created_at | Double | 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 | Double | 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
struct AppealRequest {
var appealReason: String
var attachments: [String]?
var entityID: String
var entityType: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| appeal_reason | String | Yes | Explanation for why the content is being appealed |
| entity_id | String | Yes | Unique identifier of the entity being appealed |
| entity_type | String | Yes | Type of entity being appealed (e.g., message, user) |
| attachments | [String] | No | Array of Attachment URLs(e.g., images) |
AppealResponse
struct AppealResponse {
var appealID: String
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| appeal_id | String | Yes | Unique identifier of the created Appeal item |
| duration | String | Yes |
Attachment
An attachment is a message object that represents a file uploaded by a user.
struct Attachment {
var actions: [Action]?
var assetURL: String?
var authorIcon: String?
var authorLink: String?
var authorName: String?
var color: String?
var custom: [String: Any]
var fallback: String?
var fields: [Field]?
var footer: String?
var footerIcon: String?
var giphy: Images?
var imageURL: String?
var ogScrapeURL: String?
var originalHeight: Int?
var originalWidth: Int?
var pretext: String?
var text: String?
var thumbURL: String?
var title: String?
var titleLink: String?
var type: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | [String: Any] | Yes | |
| actions | [Action] | No | |
| asset_url | String | No | |
| author_icon | String | No | |
| author_link | String | No | |
| author_name | String | No | |
| color | String | No | |
| fallback | String | No | |
| fields | [Field] | No | |
| footer | String | No | |
| footer_icon | String | No | |
| giphy | Images | No | |
| image_url | String | No | |
| og_scrape_url | String | No | |
| original_height | 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
struct AutomodPlatformCircumventionConfig {
var async: Bool?
var enabled: Bool
var rules: [AutomodRule]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | Bool | Yes | |
| rules | [AutomodRule] | Yes | |
| async | Bool | No |
AutomodRule
struct AutomodRule {
var action: String /* flag | shadow | remove | bounce | bounce_flag | bounce_remove */
var label: String
var threshold: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | String /* flag | shadow | remove |
| label | String | Yes | |
| threshold | Double | Yes |
AutomodSemanticFiltersConfig
struct AutomodSemanticFiltersConfig {
var async: Bool?
var enabled: Bool
var rules: [AutomodSemanticFiltersRule]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | Bool | Yes | |
| rules | [AutomodSemanticFiltersRule] | Yes | |
| async | Bool | No |
AutomodSemanticFiltersRule
struct AutomodSemanticFiltersRule {
var action: String /* flag | shadow | remove | bounce | bounce_flag | bounce_remove */
var name: String
var threshold: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | String /* flag | shadow | remove |
| name | String | Yes | |
| threshold | Double | Yes |
AutomodToxicityConfig
struct AutomodToxicityConfig {
var async: Bool?
var enabled: Bool
var rules: [AutomodRule]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | Bool | Yes | |
| rules | [AutomodRule] | Yes | |
| async | Bool | No |
BanActionRequestPayload
Configuration for ban moderation action
struct BanActionRequestPayload {
var banFromFutureChannels: Bool?
var channelBanOnly: Bool?
var channelCid: String?
var deleteMessages: String /* soft | pruning | hard */?
var ipBan: Bool?
var reason: String?
var shadow: Bool?
var targetUserID: String?
var timeout: Int?
}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 /* soft | pruning | 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 |
BanResponse
struct BanResponse {
var bannedBy: UserResponse?
var channel: ChannelResponse?
var createdAt: Double
var expires: Double?
var reason: String?
var shadow: Bool?
var user: UserResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | |
| banned_by | UserResponse | No | |
| channel | ChannelResponse | No | |
| expires | Double | No | |
| reason | String | No | |
| shadow | Bool | No | |
| user | UserResponse | No |
BlockActionRequestPayload
Configuration for block action
struct BlockActionRequestPayload {
var reason: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | String | No | Reason for blocking |
BlockListConfig
struct BlockListConfig {
var async: Bool?
var enabled: Bool
var matchSubstring: Bool?
var rules: [BlockListRule]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | Bool | Yes | |
| rules | [BlockListRule] | Yes | |
| async | Bool | No | |
| match_substring | Bool | No |
BlockListRule
struct BlockListRule {
var action: String /* flag | mask_flag | shadow | remove | bounce | bounce_flag | bounce_remove */
var name: String
var team: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | String /* flag | mask_flag | shadow |
| name | String | Yes | |
| team | String | Yes |
BodyguardRule
struct BodyguardRule {
var action: String /* flag | shadow | remove | bounce | bounce_flag | bounce_remove */
var label: String
var severityRules: [BodyguardSeverityRule]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | String /* flag | shadow | remove |
| label | String | Yes | |
| severity_rules | [BodyguardSeverityRule] | Yes |
BodyguardSeverityRule
struct BodyguardSeverityRule {
var action: String /* flag | shadow | remove | bounce | bounce_flag | bounce_remove */
var severity: String /* low | medium | high | critical */
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | String /* flag | shadow | remove |
| severity | String /* low | medium | high |
BypassActionRequest
struct BypassActionRequest {
var enabled: Bool?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | Bool | No |
ChannelResponse
Represents channel in chat
struct ChannelResponse {
var autoTranslationEnabled: Bool?
var autoTranslationLanguage: String?
var blocked: Bool?
var cid: String
var config: ChannelConfigWithInfo?
var cooldown: Int?
var createdAt: Double
var createdBy: UserResponse?
var custom: [String: Any]
var deletedAt: Double?
var disabled: Bool
var filterTags: [String]?
var frozen: Bool
var hidden: Bool?
var hideMessagesBefore: Double?
var id: String
var lastMessageAt: Double?
var memberCount: Int?
var members: [ChannelMemberResponse]?
var messageCount: Int?
var muteExpiresAt: Double?
var muted: Bool?
var ownCapabilities: [ChannelOwnCapability]?
var team: String?
var truncatedAt: Double?
var truncatedBy: UserResponse?
var type: String
var updatedAt: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| cid | String | Yes | Channel CID (<type>:<id>) |
| created_at | Double | Yes | Date/time of creation |
| custom | [String: Any] | 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 | Double | 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 | Double | 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 | Double | No | Date since when the message history is accessible |
| last_message_at | Double | 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 | Double | 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 | Double | No | Date of the latest truncation of the channel |
| truncated_by | UserResponse | No |
ConfigResponse
struct ConfigResponse {
var aiImageConfig: AIImageConfig?
var aiImageLabelDefinitions: [AIImageLabelDefinition]?
var aiImageSubclassifications: [String: Any]?
var aiTextConfig: AITextConfig?
var aiVideoConfig: AIVideoConfig?
var async: Bool
var automodPlatformCircumventionConfig: AutomodPlatformCircumventionConfig?
var automodSemanticFiltersConfig: AutomodSemanticFiltersConfig?
var automodToxicityConfig: AutomodToxicityConfig?
var blockListConfig: BlockListConfig?
var createdAt: Double
var key: String
var llmConfig: LLMConfig?
var supportedVideoCallHarmTypes: [String]
var team: String
var updatedAt: Double
var velocityFilterConfig: VelocityFilterConfig?
var videoCallRuleConfig: VideoCallRuleConfig?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | Bool | Yes | Whether moderation should be performed asynchronously |
| created_at | Double | 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 | Double | 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 | [String: Any] | No | Available L2 subclassifications per L1 image moderation label, based on the a... |
| ai_text_config | AITextConfig | No | Configuration for AI text analysis |
| ai_video_config | AIVideoConfig | No | Configuration for AI video analysis |
| automod_platform_circumvention_config | AutomodPlatformCircumventionConfig | No | Configuration for platform circumvention detection |
| automod_semantic_filters_config | AutomodSemanticFiltersConfig | No | Configuration for semantic filtering |
| automod_toxicity_config | AutomodToxicityConfig | No | Configuration for toxicity detection |
| block_list_config | BlockListConfig | No | Configuration for block list filtering |
| llm_config | LLMConfig | No | Configuration for customer-configured LLM moderation |
| velocity_filter_config | VelocityFilterConfig | No | Configuration for velocity-based filtering |
| video_call_rule_config | VideoCallRuleConfig | No |
CustomActionRequestPayload
Configuration for custom moderation action
struct CustomActionRequestPayload {
var id: String?
var options: [String: Any]?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | No | Custom action identifier |
| options | [String: Any] | No | Custom action options |
DeleteActivityRequestPayload
Configuration for activity deletion action
struct DeleteActivityRequestPayload {
var entityID: String?
var entityType: String?
var hardDelete: Bool?
var reason: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| entity_id | String | No | ID of the activity to delete (alternative to item_id) |
| entity_type | String | No | Type of the entity (required for delete_activity to distinguish v2 vs v3) |
| hard_delete | Bool | No | Whether to permanently delete the activity |
| reason | String | No | Reason for deletion |
DeleteCommentRequestPayload
Configuration for comment deletion action
struct DeleteCommentRequestPayload {
var entityID: String?
var entityType: String?
var hardDelete: Bool?
var reason: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| entity_id | String | No | ID of the comment to delete (alternative to item_id) |
| entity_type | String | No | Type of the entity |
| hard_delete | Bool | No | Whether to permanently delete the comment |
| reason | String | No | Reason for deletion |
DeleteMessageRequestPayload
Configuration for message deletion action
struct DeleteMessageRequestPayload {
var entityID: String?
var entityType: String?
var hardDelete: Bool?
var reason: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| entity_id | String | No | ID of the message to delete (alternative to item_id) |
| entity_type | String | No | Type of the entity |
| hard_delete | Bool | No | Whether to permanently delete the message |
| reason | String | No | Reason for deletion |
DeleteModerationConfigResponse
struct DeleteModerationConfigResponse {
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes |
DeleteReactionRequestPayload
Configuration for reaction deletion action
struct DeleteReactionRequestPayload {
var entityID: String?
var entityType: String?
var hardDelete: Bool?
var reason: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| entity_id | String | No | ID of the reaction to delete (alternative to item_id) |
| entity_type | String | No | Type of the entity |
| hard_delete | Bool | No | Whether to permanently delete the reaction |
| reason | String | No | Reason for deletion |
DeleteUserRequestPayload
Configuration for user deletion action
struct DeleteUserRequestPayload {
var deleteConversationChannels: Bool?
var deleteFeedsContent: Bool?
var entityID: String?
var entityType: String?
var hardDelete: Bool?
var markMessagesDeleted: Bool?
var reason: String?
}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
struct EscalatePayload {
var notes: String?
var priority: String?
var reason: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| notes | String | No | Additional context for the reviewer |
| priority | String | No | Priority of the escalation (low, medium, high) |
| reason | String | No | Reason for the escalation (from configured escalation_reasons) |
Field
struct Field {
var short: Bool
var title: String
var value: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| short | Bool | Yes | |
| title | String | Yes | |
| value | String | Yes |
FilterConfigResponse
struct FilterConfigResponse {
var aiTextLabels: [String]?
var configKeys: [String]?
var llmLabels: [String]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| llm_labels | [String] | Yes | |
| ai_text_labels | [String] | No | |
| config_keys | [String] | No |
FlagRequest
struct FlagRequest {
var custom: [String: Any]?
var entityCreatorID: String?
var entityID: String
var entityType: String
var moderationPayload: ModerationPayload?
var reason: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| entity_id | String | Yes | Unique identifier of the entity being flagged |
| entity_type | String | Yes | Type of entity being flagged (e.g., message, user) |
| custom | [String: Any] | No | Additional metadata about the flag |
| entity_creator_id | String | No | ID of the user who created the flagged entity |
| moderation_payload | ModerationPayload | No | Content being flagged |
| reason | String | No | Optional explanation for why the content is being flagged |
FlagResponse
struct FlagResponse {
var duration: String
var itemID: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| item_id | String | Yes | Unique identifier of the created moderation item |
GetAppealResponse
struct GetAppealResponse {
var duration: String
var item: AppealItemResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| item | AppealItemResponse | No | Current state of the appeal |
GetConfigResponse
struct GetConfigResponse {
var config: ConfigResponse?
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| config | ConfigResponse | No | The retrieved moderation configuration |
GoogleVisionConfig
struct GoogleVisionConfig {
var enabled: Bool?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | Bool | No |
HarmConfig
struct HarmConfig {
var actionSequences: [ActionSequence]
var cooldownPeriod: Int
var harmTypes: [String]
var severity: Int
var threshold: Int
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action_sequences | [ActionSequence] | Yes | |
| cooldown_period | Int | Yes | |
| harm_types | [String] | Yes | |
| severity | Int | Yes | |
| threshold | Int | Yes |
Images
struct Images {
var fixedHeight: ImageData
var fixedHeightDownsampled: ImageData
var fixedHeightStill: ImageData
var fixedWidth: ImageData
var fixedWidthDownsampled: ImageData
var fixedWidthStill: ImageData
var original: ImageData
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| fixed_height | ImageData | Yes | |
| fixed_height_downsampled | ImageData | Yes | |
| fixed_height_still | ImageData | Yes | |
| fixed_width | ImageData | Yes | |
| fixed_width_downsampled | ImageData | Yes | |
| fixed_width_still | ImageData | Yes | |
| original | ImageData | Yes |
LLMConfig
struct LLMConfig {
var appContext: String?
var async: Bool?
var enabled: Bool
var rules: [LLMRule]
var severityDescriptions: [String: Any]?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| enabled | Bool | Yes | |
| rules | [LLMRule] | Yes | |
| app_context | String | No | |
| async | Bool | No | |
| severity_descriptions | [String: Any] | No |
LLMRule
struct LLMRule {
var action: String /* flag | shadow | remove | bounce | bounce_flag | bounce_remove | keep */
var description: String
var label: String
var severityRules: [BodyguardSeverityRule]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | String /* flag | shadow | remove |
| description | String | Yes | |
| label | String | Yes | |
| severity_rules | [BodyguardSeverityRule] | Yes |
MarkReviewedRequestPayload
Configuration for mark reviewed action
struct MarkReviewedRequestPayload {
var contentToMarkAsReviewedLimit: Int?
var decisionReason: String?
var disableMarkingContentAsReviewed: Bool?
}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
struct MessageRequest {
var attachments: [Attachment]?
var custom: [String: Any]?
var id: String?
var mentionedChannel: Bool?
var mentionedGroupIds: [String]?
var mentionedHere: Bool?
var mentionedRoles: [String]?
var mentionedUsers: [String]?
var mml: String?
var parentID: String?
var pinExpires: Double?
var pinned: Bool?
var pinnedAt: String?
var pollID: String?
var quotedMessageID: String?
var restrictedVisibility: [String]?
var sharedLocation: SharedLocation?
var showInChannel: Bool?
var silent: Bool?
var text: String?
var type: String /* '' | regular | system */?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| attachments | [Attachment] | No | Array of message attachments |
| custom | [String: Any] | No | |
| 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 | Double | 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 /* '' | regular | system */ |
ModerationPayload
struct ModerationPayload {
var custom: [String: Any]?
var images: [String]?
var texts: [String]?
var videos: [String]?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| custom | [String: Any] | No | |
| images | [String] | No | |
| texts | [String] | No | |
| videos | [String] | No |
MuteResponse
struct MuteResponse {
var duration: String
var mutes: [UserMuteResponse]?
var nonExistingUsers: [String]?
var ownUser: OwnUserResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| mutes | [UserMuteResponse] | No | Object with mutes (if multiple users were muted) |
| non_existing_users | [String] | No | A list of users that can't be found. Common cause for this is deleted users |
| own_user | OwnUserResponse | No | Authorized user object with fresh mutes information |
OCRRule
struct OCRRule {
var action: String /* flag | shadow | remove | bounce | bounce_flag | bounce_remove */
var label: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | String /* flag | shadow | remove |
| label | String | Yes |
OwnUserResponse
struct OwnUserResponse {
var avgResponseTime: Int?
var banned: Bool
var blockedUserIds: [String]?
var channelMutes: [ChannelMute]
var createdAt: Double
var custom: [String: Any]
var deactivatedAt: Double?
var deletedAt: Double?
var devices: [DeviceResponse]
var id: String
var image: String?
var invisible: Bool
var language: String
var lastActive: Double?
var latestHiddenChannels: [String]?
var mutes: [UserMuteResponse]
var name: String?
var online: Bool
var privacySettings: PrivacySettingsResponse?
var pushPreferences: PushPreferencesResponse?
var revokeTokensIssuedBefore: Double?
var role: String
var teams: [String]
var teamsRole: [String: Any]?
var totalUnreadCount: Int
var totalUnreadCountByTeam: [String: Any]?
var unreadChannels: Int
var unreadCount: Int
var unreadThreads: Int
var updatedAt: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | Bool | Yes | |
| channel_mutes | [ChannelMute] | Yes | |
| created_at | Double | Yes | |
| custom | [String: Any] | 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 | Double | Yes | |
| avg_response_time | Int | No | |
| blocked_user_ids | [String] | No | |
| deactivated_at | Double | No | |
| deleted_at | Double | No | |
| image | String | No | |
| last_active | Double | No | |
| latest_hidden_channels | [String] | No | |
| name | String | No | |
| privacy_settings | PrivacySettingsResponse | No | |
| push_preferences | PushPreferencesResponse | No | |
| revoke_tokens_issued_before | Double | No | |
| teams_role | [String: Any] | No | |
| total_unread_count_by_team | [String: Any] | No |
PrivacySettingsResponse
struct PrivacySettingsResponse {
var deliveryReceipts: DeliveryReceiptsResponse?
var readReceipts: ReadReceiptsResponse?
var typingIndicators: TypingIndicatorsResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| delivery_receipts | DeliveryReceiptsResponse | No | |
| read_receipts | ReadReceiptsResponse | No | |
| typing_indicators | TypingIndicatorsResponse | No |
QueryAppealsResponse
struct QueryAppealsResponse {
var duration: String
var items: [AppealItemResponse]
var next: String?
var prev: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| items | [AppealItemResponse] | Yes | List of Appeal Items |
| next | String | No | |
| prev | String | No |
QueryModerationConfigsResponse
struct QueryModerationConfigsResponse {
var configs: [ConfigResponse]
var duration: String
var next: String?
var prev: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| configs | [ConfigResponse] | Yes | List of moderation configurations |
| duration | String | Yes | |
| next | String | No | |
| prev | String | No |
QueryReviewQueueResponse
struct QueryReviewQueueResponse {
var actionConfig: [String: Any]
var duration: String
var filterConfig: FilterConfigResponse?
var items: [ReviewQueueItemResponse]
var next: String?
var prev: String?
var stats: [String: Any]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action_config | [String: Any] | Yes | Configuration for moderation actions |
| duration | String | Yes | |
| items | [ReviewQueueItemResponse] | Yes | List of review queue items |
| stats | [String: Any] | Yes | Statistics about the review queue |
| filter_config | FilterConfigResponse | No | Configuration for filters in moderation review queue |
| next | String | No | |
| prev | String | No |
Reaction
struct Reaction {
var activityID: String
var childrenCounts: [String: Any]?
var createdAt: Double
var data: [String: Any]?
var deletedAt: Double?
var id: String?
var kind: String
var latestChildren: [String: Any]?
var moderation: [String: Any]?
var ownChildren: [String: Any]?
var parent: String?
var score: Double?
var targetFeeds: [String]?
var targetFeedsExtraData: [String: Any]?
var updatedAt: Double
var user: User?
var userID: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| activity_id | String | Yes | |
| created_at | Double | Yes | |
| kind | String | Yes | |
| updated_at | Double | Yes | |
| user_id | String | Yes | |
| children_counts | [String: Any] | No | |
| data | [String: Any] | No | |
| deleted_at | Double | No | |
| id | String | No | |
| latest_children | [String: Any] | No | |
| moderation | [String: Any] | No | |
| own_children | [String: Any] | No | |
| parent | String | No | |
| score | Double | No | |
| target_feeds | [String] | No | |
| target_feeds_extra_data | [String: Any] | No | |
| user | User | No |
ReactionRequest
Represents user reaction to a message
struct ReactionRequest {
var createdAt: Double?
var custom: [String: Any]?
var score: Int?
var type: String
var updatedAt: Double?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| type | String | Yes | The type of reaction (e.g. 'like', 'laugh', 'wow') |
| created_at | Double | No | Date/time of creation |
| custom | [String: Any] | No | |
| score | Int | No | Reaction score. If not specified reaction has score of 1 |
| updated_at | Double | No | Date/time of the last update |
RejectAppealRequestPayload
Configuration for rejecting an appeal
struct RejectAppealRequestPayload {
var decisionReason: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | String | Yes | Reason for rejecting the appeal |
RestoreActionRequestPayload
Configuration for restore action
struct RestoreActionRequestPayload {
var decisionReason: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | String | No | Reason for the appeal decision |
ReviewQueueItemResponse
struct ReviewQueueItemResponse {
var actions: [ActionLogResponse]
var activity: EnrichedActivity?
var aiTextSeverity: String
var appeal: AppealItemResponse?
var assignedTo: UserResponse?
var bans: [BanInfoResponse]
var call: CallResponse?
var completedAt: Double?
var configKey: String?
var createdAt: Double
var entityCreator: EntityCreatorResponse?
var entityCreatorID: String?
var entityID: String
var entityType: String
var escalated: Bool
var escalatedAt: Double?
var escalatedBy: String?
var escalationMetadata: EscalationMetadata?
var feedsV2Activity: EnrichedActivity?
var feedsV2Reaction: Reaction?
var feedsV3Activity: FeedsV3ActivityResponse?
var feedsV3Comment: FeedsV3CommentResponse?
var flags: [ModerationFlagResponse]
var flagsCount: Int
var id: String
var languages: [String]
var latestModeratorAction: String
var message: MessageResponse?
var moderationPayload: ModerationPayloadResponse?
var reaction: Reaction?
var recommendedAction: String
var reviewedAt: Double?
var reviewedBy: String
var severity: Int
var status: String
var teams: [String]?
var updatedAt: Double
}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 | Double | 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 | Double | 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 | Double | 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 | Double | 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 | Double | No | When the item was reviewed |
| teams | [String] | No | Teams associated with this item |
RuleBuilderConfig
struct RuleBuilderConfig {
var async: Bool?
var rules: [RuleBuilderRule]?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| async | Bool | No | |
| rules | [RuleBuilderRule] | No |
RuleBuilderRule
struct RuleBuilderRule {
var action: RuleBuilderAction?
var actionSequences: [CallRuleActionSequence]?
var conditions: [RuleBuilderCondition]?
var cooldownPeriod: String?
var groups: [RuleBuilderConditionGroup]?
var id: String?
var logic: String?
var ruleType: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| rule_type | String | Yes | |
| action | RuleBuilderAction | No | |
| action_sequences | [CallRuleActionSequence] | No | |
| conditions | [RuleBuilderCondition] | No | |
| cooldown_period | String | No | |
| groups | [RuleBuilderConditionGroup] | No | |
| id | String | No | |
| logic | String | No |
ShadowBlockActionRequestPayload
Configuration for shadow block action
struct ShadowBlockActionRequestPayload {
var reason: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| reason | String | No | Reason for shadow blocking |
SharedLocation
struct SharedLocation {
var createdByDeviceID: String?
var endAt: Double?
var latitude: Double
var longitude: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| latitude | Double | Yes | |
| longitude | Double | Yes | |
| created_by_device_id | String | No | |
| end_at | Double | No |
SortParamRequest
struct SortParamRequest {
var direction: Int?
var field: String?
var type: String?
}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
struct SubmitActionResponse {
var appealItem: AppealItemResponse?
var duration: String
var item: ReviewQueueItemResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| appeal_item | AppealItemResponse | No | Updated Appeal item after action was performed |
| item | ReviewQueueItemResponse | No | Updated review queue item after action was performed |
UnbanActionRequestPayload
Configuration for unban moderation action
struct UnbanActionRequestPayload {
var channelCid: String?
var decisionReason: String?
var removeFutureChannelsBan: Bool?
}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 |
UnblockActionRequestPayload
Configuration for unblock action
struct UnblockActionRequestPayload {
var decisionReason: String?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| decision_reason | String | No | Reason for the appeal decision |
UpsertConfigResponse
struct UpsertConfigResponse {
var config: ConfigResponse?
var duration: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| duration | String | Yes | |
| config | ConfigResponse | No | The created or updated moderation configuration |
User
struct User {
var data: [String: Any]?
var id: String
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | |
| data | [String: Any] | No |
UserMuteResponse
struct UserMuteResponse {
var createdAt: Double
var expires: Double?
var target: UserResponse?
var updatedAt: Double
var user: UserResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| created_at | Double | Yes | |
| updated_at | Double | Yes | |
| expires | Double | No | |
| target | UserResponse | No | |
| user | UserResponse | No |
UserRequest
User request object
struct UserRequest {
var custom: [String: Any]?
var id: String
var image: String?
var invisible: Bool?
var language: String?
var name: String?
var privacySettings: PrivacySettingsResponse?
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| id | String | Yes | User ID |
| custom | [String: Any] | 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 |
UserResponse
User response object
struct UserResponse {
var avgResponseTime: Int?
var banned: Bool
var blockedUserIds: [String]
var createdAt: Double
var custom: [String: Any]
var deactivatedAt: Double?
var deletedAt: Double?
var id: String
var image: String?
var language: String
var lastActive: Double?
var name: String?
var online: Bool
var revokeTokensIssuedBefore: Double?
var role: String
var teams: [String]
var teamsRole: [String: Any]?
var updatedAt: Double
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| banned | Bool | Yes | Whether a user is banned or not |
| blocked_user_ids | [String] | Yes | |
| created_at | Double | Yes | Date/time of creation |
| custom | [String: Any] | Yes | Custom data for this object |
| id | String | Yes | Unique user identifier |
| 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 |
| teams | [String] | Yes | List of teams user is a part of |
| updated_at | Double | Yes | Date/time of the last update |
| avg_response_time | Int | No | |
| deactivated_at | Double | No | Date of deactivation |
| deleted_at | Double | No | Date/time of deletion |
| image | String | No | |
| last_active | Double | No | Date of last activity |
| name | String | No | Optional name of user |
| revoke_tokens_issued_before | Double | No | Revocation date for tokens |
| teams_role | [String: Any] | No |
VelocityFilterConfig
struct VelocityFilterConfig {
var advancedFilters: Bool
var async: Bool?
var cascadingActions: Bool
var cidsPerUser: Int
var enabled: Bool
var firstMessageOnly: Bool
var rules: [VelocityFilterConfigRule]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| advanced_filters | Bool | Yes | |
| cascading_actions | Bool | Yes | |
| cids_per_user | Int | Yes | |
| enabled | Bool | Yes | |
| first_message_only | Bool | Yes | |
| rules | [VelocityFilterConfigRule] | Yes | |
| async | Bool | No |
VelocityFilterConfigRule
struct VelocityFilterConfigRule {
var action: String /* flag | shadow | remove | ban */
var banDuration: Int
var cascadingAction: String /* flag | shadow | remove | ban */
var cascadingThreshold: Int
var checkMessageContext: Bool
var fastSpamThreshold: Int
var fastSpamTtl: Int
var ipBan: Bool
var probationPeriod: Int
var shadowBan: Bool
var slowSpamBanDuration: Int?
var slowSpamThreshold: Int
var slowSpamTtl: Int
var urlOnly: Bool
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| action | String /* flag | shadow | remove |
| ban_duration | Int | Yes | |
| cascading_action | String /* flag | shadow | remove |
| cascading_threshold | Int | Yes | |
| check_message_context | Bool | Yes | |
| fast_spam_threshold | Int | Yes | |
| fast_spam_ttl | Int | Yes | |
| ip_ban | Bool | Yes | |
| probation_period | Int | Yes | |
| shadow_ban | Bool | Yes | |
| slow_spam_threshold | Int | Yes | |
| slow_spam_ttl | Int | Yes | |
| url_only | Bool | Yes | |
| slow_spam_ban_duration | Int | No |
VideoCallRuleConfig
struct VideoCallRuleConfig {
var flagAllLabels: Bool
var flaggedLabels: [String]
var rules: [HarmConfig]
}Properties:
| Property | Type | Required | Description |
|---|---|---|---|
| flag_all_labels | Bool | Yes | |
| flagged_labels | [String] | Yes | |
| rules | [HarmConfig] | Yes |