client.moderation().submit_action(
action_type="mark_reviewed",
item_id="review_queue_item_id",
user_id=moderator_id,
)Actions
Submit Action
This is the most important endpoint in the moderation API. It allows moderators to take action on review queue items. Actions include deleting content, banning users, marking items as reviewed, restoring deleted content, and more.
POST /api/v2/moderation/submit_action
Request Parameters
| Key | Required | Type | Description |
|---|---|---|---|
| action_type | true | string | The action to take. See supported action types below. |
| item_id | false | string | Review queue item ID. Required for most actions. |
| user_id | false | string | User ID of the moderator performing the action. |
| ban | false | object | Ban-specific parameters (used with ban action type). |
| unban | false | object | Unban-specific parameters (used with unban action type). |
| delete_message | false | object | Delete message parameters. |
| delete_activity | false | object | Delete activity parameters. |
| restore | false | object | Restore parameters (used with restore action type). |
| unblock | false | object | Unblock parameters (used with unblock action type). |
| custom | false | object | Custom action parameters (used with custom action type). |
| reject_appeal | false | object | Reject appeal parameters. |
| appeal_id | false | string | Appeal ID (for appeal-related actions). |
| decision_reason | false | string | Reason for the decision (shown to users for appeal decisions). |
Response
| Key | Type | Description |
|---|---|---|
| item | object | The updated review queue item. |
Supported Action Types
| Action Type | Description |
|---|---|
| mark_reviewed | Mark the item as reviewed without taking further action (content is safe). |
| delete_message | Delete a flagged chat message. |
| delete_activity | Delete a flagged activity (feeds). |
| ban | Ban the content creator. Supports channel-scoped, shadow, IP, and temporary bans. |
| unban | Unban a previously banned user. Also accepts appeals automatically. |
| restore | Restore previously deleted content. Also accepts appeals automatically. |
| unblock | Unblock previously blocked content. Also accepts appeals automatically. |
| escalate | Escalate the item for higher-level review. |
| de_escalate | De-escalate a previously escalated item. |
| shadow_block | Shadow-block content (hidden from others but visible to the creator). |
| end_call | End an active video call. |
| reject_appeal | Reject a user's appeal against a moderation decision. |
| custom | Trigger a custom action (sends a webhook to your server). |
Delete Message
Delete a flagged chat message from the review queue.
client.moderation().submit_action(
action_type="delete_message",
item_id="review_queue_item_id",
user_id=moderator_id,
)Ban User
Ban the creator of flagged content. Supports channel-scoped bans, shadow bans, IP bans, and temporary bans with a timeout.
client.moderation().submit_action(
action_type="ban",
item_id="review_queue_item_id",
ban={"reason": "Repeated harassment", "timeout": 1440, "channel_cids": ["messaging:general"]},
user_id=moderator_id,
)Ban from Future Channels
Set ban_from_future_channels: true on a ban action to also auto-apply the ban to any new channels created later by the same user who created the channel the target is being banned from. This is useful when a community owner repeatedly creates new channels and you want a known offender kept out without re-banning them every time. The ban is applied automatically as the channel creator opens additional channels and remains in effect until removed via an unban with remove_future_channels_ban: true.
client.moderation().submit_action(
action_type="ban",
item_id="review_queue_item_id",
ban={"reason": "Repeated harassment", "ban_from_future_channels": True},
user_id=moderator_id,
)To remove a previously applied future-channels ban, submit an unban action with remove_future_channels_ban: true:
client.moderation().submit_action(
action_type="unban",
item_id="review_queue_item_id",
unban={"remove_future_channels_ban": True},
user_id=moderator_id,
)Restore Content
Restore previously deleted content. This is typically used when content was incorrectly flagged or removed. If the item has an associated appeal, the appeal is automatically accepted.
client.moderation().submit_action(
action_type="restore",
item_id="review_queue_item_id",
restore={},
decision_reason="Content was incorrectly flagged",
user_id=moderator_id,
)Custom Action
Trigger a custom action that sends a webhook to your server. Use this to integrate your own moderation workflows.
client.moderation().submit_action(
action_type="custom",
item_id="review_queue_item_id",
custom={
"custom_action_name": "notify_user",
"custom_data": {"notification": "Your content has been reviewed"},
},
user_id=moderator_id,
)Bulk Submit Action
Submit multiple moderation actions in a single request. This is useful for batch operations such as approving or deleting multiple flagged items at once.
POST /api/v2/moderation/bulk_submit_action
client.moderation().bulk_submit_action(
actions=[
{"action_type": "mark_reviewed", "item_id": "item_id_1", "user_id": moderator_id},
{"action_type": "delete_message", "item_id": "item_id_2", "user_id": moderator_id},
{"action_type": "mark_reviewed", "item_id": "item_id_3", "user_id": moderator_id},
]
)Request Parameters
| Key | Required | Type | Description |
|---|---|---|---|
| actions | true | array | List of action objects. Each object follows the same schema as the Submit Action request. |
Response
| Key | Type | Description |
|---|---|---|
| results | array | List of results for each submitted action. |