Skip to main content
PUT
/
apps
/
{appId}
/
moderation
/
keywords
/
{keywordId}
Update keyword
curl --request PUT \
  --url https://apimgmt.cometchat.io/apps/{appId}/moderation/keywords/{keywordId} \
  --header 'Content-Type: multipart/form-data' \
  --header 'key: <key>' \
  --header 'secret: <secret>' \
  --form id=ID-of-the-word-list \
  --form 'name=Name of the word list' \
  --form 'description=Description of the word list' \
  --form category=word \
  --form 'searchTerms=AI-powered video moderation to detect unsafe content.' \
  --form file=@example-file
{
  "data": {
    "id": "profanity-list",
    "name": "Profane Words",
    "category": "word",
    "isCSV": false,
    "searchTerms": [
      "fuck",
      "nigger",
      "fuck",
      "nigger",
      "wanker",
      "cunt",
      "damn",
      "shit",
      "fag",
      "shithead",
      "jizz",
      "hellbitch",
      "retard",
      "cocksucker",
      "cock",
      "kill",
      "cunt",
      "kike",
      "twat",
      "bastard",
      "death",
      "asshole",
      "wop",
      "scumbag",
      "penis",
      "murder",
      "dick",
      "gook",
      "vagina",
      "rape",
      "bastard",
      "spic",
      "spunk",
      "beat"
    ],
    "createdAt": 1718354412,
    "updatedAt": 1718354412,
    "revisionId": "253157108b5294c4_profanity-list_1",
    "active": true,
    "default": true
  }
}
This API has been deprecated, use the updated version at - Update Keyword

Headers

key
string
required

Authorization Key

secret
string
required

Authorization Secret

Path Parameters

keywordId
string
required

Keyword ID

appId
string
required

AppID in which the extension has to be enabled/disabled

Body

multipart/form-data
  • Option 1
  • Option 2
  • Option 3
category
enum<string>
required

Type of entries in the list

Available options:
word,
pattern,
sentence-similarity
searchTerms
string
required

Comma-separated values of keywords or regex patterns if no file is provided.

Example:

"AI-powered video moderation to detect unsafe content."

file
file

CSV file containing the keywords or regex patterns for the list.

id
string

Unique identifier for the word list.

Example:

"ID-of-the-word-list"

name
string

Descriptive name for the word list.

Example:

"Name of the word list"

description
string

Detailed explanation of the word list's purpose.

Example:

"Description of the word list"

Response

200 - application/json

Update Keyword

data
object
I