const response = await client.moderation.queryReviewQueue({
filter: {
entity_type: "stream:chat:v1:message",
reviewed: false,
},
sort: [{ field: "created_at", direction: -1 }],
limit: 20,
});Review Queue
Overview
The Review Queue is the central hub for moderators. It contains content flagged by automated moderation engines or reported by users. Moderators query the queue to review items and take actions such as approve, delete, ban, and more. The submit_action endpoint is the most commonly used endpoint in the moderation API.
Query Review Queue
Use this endpoint to retrieve items from the review queue. It supports filtering by content type, review status, moderation category, and more. You can also sort results, paginate through them, and lock items to prevent multiple moderators from reviewing the same item simultaneously.
POST /api/v2/moderation/review_queue
response, err := client.Moderation().QueryReviewQueue(ctx, &getstream.QueryReviewQueueRequest{
Filter: map[string]interface{}{
"entity_type": "stream:chat:v1:message",
"reviewed": false,
},
Sort: []getstream.SortParam{{Field: "created_at", Direction: getstream.PtrTo(-1)}},
Limit: getstream.PtrTo(20),
})Filter Parameters
| Key | Type | Description |
|---|---|---|
| id | string | Filter by specific review queue item ID. |
| created_at | datetime | Filter by creation date. |
| updated_at | datetime | Filter by last update date. |
| status | string | Filter by moderation check status: partial, complete. |
| entity_type | string | Filter by entity type (e.g., stream:chat:v1:message, stream:user, stream:feeds:v2:activity). |
| entity_id | string | Filter by entity ID. |
| entity_creator_id | string | Filter by the user who created the content. |
| reviewed | boolean | Filter by review status. false for unreviewed items. |
| has_text | boolean | Filter items containing flagged text. |
| has_image | boolean | Filter items containing flagged images. |
| has_video | boolean | Filter items containing flagged video. |
| category | string | Filter by moderation engine: ai_text, ai_image, automod_toxicity, automod_platform_circumvention, block_list. |
| label | string | Filter by classification label (e.g., spam, harassment). |
| recommended_action | string | Filter by recommended action: remove, flag, shadow_block. |
| reporter_type | string | Filter by who flagged: moderator, user, automod. |
| reporter_id | string | Filter by specific reporter user ID. |
| date_range | string | Filter by date range. Format: "2024-01-01T00:00:00_2024-12-31T00:00:00". |
| appeal | boolean | Filter items that have (true) or don't have (false) an appeal. |
| appeal_status | string | Filter by appeal status: submitted, accepted, rejected. |
| user_report_reason | string | Filter items flagged by users with a given reason. |
Request Parameters
| Key | Required | Type | Description |
|---|---|---|---|
| filter | false | object | Filter conditions (see above). |
| sort | false | array | Sort parameters. Supported fields: id, created_at, updated_at. |
| limit | false | number | Maximum items to return (default 20). |
| next | false | string | Cursor for pagination. |
| lock_items | false | boolean | When true, locks returned items to prevent other moderators from reviewing them simultaneously. |
| lock_count | false | number | Number of items to lock (1-25). Only used with lock_items. |
| lock_duration | false | number | Lock duration in seconds. |
| stats_only | false | boolean | When true, returns only queue statistics without items. |
Response
| Key | Type | Description |
|---|---|---|
| items | array | List of review queue items. |
| next | string | Next cursor for pagination. |
| stats | object | Queue statistics (counts by content type). |
Get Review Queue Item
Retrieve a specific review queue item by its ID. This returns the full item details including the entity content, moderation flags, and any actions already taken.
GET /api/v2/moderation/review_queue/{id}
response, err := client.Moderation().GetReviewQueueItem(ctx, "item_id", &getstream.GetReviewQueueItemRequest{})Request Parameters
| Key | Required | Type | Description |
|---|---|---|---|
| id | true | string | The review queue item ID. |
Response
| Key | Type | Description |
|---|---|---|
| item | object | The review queue item with full details. |