{
"data": {
"id": "moderation-test",
"name": "Video Moderation",
"description": "AI-powered video moderation to detect unsafe content.",
"enabled": true,
"conditions": [
{
"id": 1,
"isKeywordsReferencePresent": false,
"isMediaPresent": true,
"entity": "message",
"operand": "image",
"category": "word",
"operator": "contains",
"value": [
"violence_greaterThan_30"
],
"message": [
"Image contains violence with confidence greater than 30"
]
}
],
"action": [
"blockMessage"
],
"active": true,
"createdAt": 1720003247,
"updatedAt": 1720003247,
"revisionId": "253179cf5f665257_moderation-test_1"
}
}Rules
Update Rule
Update a CometChat moderation rule by ruleId with REST API to change content checks, actions, or rule conditions.
PUT
/
moderation
/
rules
/
{ruleId}
{
"data": {
"id": "moderation-test",
"name": "Video Moderation",
"description": "AI-powered video moderation to detect unsafe content.",
"enabled": true,
"conditions": [
{
"id": 1,
"isKeywordsReferencePresent": false,
"isMediaPresent": true,
"entity": "message",
"operand": "image",
"category": "word",
"operator": "contains",
"value": [
"violence_greaterThan_30"
],
"message": [
"Image contains violence with confidence greater than 30"
]
}
],
"action": [
"blockMessage"
],
"active": true,
"createdAt": 1720003247,
"updatedAt": 1720003247,
"revisionId": "253179cf5f665257_moderation-test_1"
}
}Body
application/json
The body is of type any.
Response
200 - application/json
Update Rule
Show child attributes
Show child attributes
Was this page helpful?
⌘I