User Flagging - Content Moderation
User Flagging
Users flag content via baseEntry.flag. This creates a moderation flag record and sets the entry status to FLAGGED_FOR_REVIEW (5). The entry remains playable during review.
baseEntry.flag — Flag an Entry
curl -X POST "$KALTURA_SERVICE_URL/service/baseEntry/action/flag" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "moderationFlag[objectType]=KalturaModerationFlag" \
-d "moderationFlag[flaggedEntryId]=$KALTURA_ENTRY_ID" \
-d "moderationFlag[flagType]=1" \
-d "moderationFlag[comments]=Contains inappropriate content"
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
moderationFlag[flaggedEntryId] | string | yes | Entry ID to flag |
moderationFlag[flagType] | integer | yes | Flag reason (see Flag Types below) |
moderationFlag[comments] | string | no | Free-text explanation (max 1024 chars) |
Flag types (KalturaModerationFlagType):
| Value | Name | Description |
|---|---|---|
| 1 | SEXUAL_CONTENT | Nudity, pornography, or suggestive content |
| 2 | VIOLENT_REPULSIVE | Violence, gore, or repulsive content |
| 3 | HARMFUL_DANGEROUS | Harmful or dangerous acts |
| 4 | SPAM_COMMERCIALS | Spam or commercial promotion |
| 5 | COPYRIGHT | Copyright infringement |
| 6 | TERMS_OF_USE_VIOLATION | Violates terms of use |
Validation: The entry must be in APPROVED (2), AUTO_APPROVED (6), or FLAGGED_FOR_REVIEW (5) status. Flagging a REJECTED or PENDING_MODERATION entry returns ENTRY_CANNOT_BE_FLAGGED.
Response: Returns a KalturaModerationFlag object with the generated flag ID, status PENDING (1), and creation timestamp.
Side effects:
- Entry
moderationStatuschanges toFLAGGED_FOR_REVIEW(5) if not already - Entry
moderationCountincrements by 1 - Email notifications fire to users with
CONTENT_MODERATE_APPROVE_REJECTpermission
Permissions: Flagging is broadly permitted — works with user sessions, widget sessions, and playback sessions. Anonymous flagging from widget KS is supported.
baseEntry.listFlags — List Pending Flags
curl -X POST "$KALTURA_SERVICE_URL/service/baseEntry/action/listFlags" \
-d "ks=$KALTURA_KS" \
-d "format=1" \
-d "entryId=$KALTURA_ENTRY_ID" \
-d "pager[pageSize]=50"
Response:
{
"totalCount": 2,
"objects": [
{
"id": 12345,
"flaggedEntryId": "0_abc123",
"flagType": 1,
"comments": "Inappropriate content in first 30 seconds",
"status": 1,
"createdAt": 1700000000,
"objectType": "KalturaModerationFlag"
}
],
"objectType": "KalturaModerationFlagListResponse"
}
Returns flags with status=PENDING (1). After approve or reject, flags are marked MODERATED (2) and no longer appear in this list.
Flag status enum (KalturaModerationFlagStatus):
| Value | Name |
|---|---|
| 1 | PENDING |
| 2 | MODERATED |
Permission: Requires CONTENT_MODERATE_BASE.