PUT
/
wordlist
/
{id}
Update wordlist
curl --request PUT \
  --url https://moderationapi.com/api/v1/wordlist/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "words": [
    "<string>"
  ],
  "strict": true
}'
{
  "id": "<string>",
  "name": "<string>",
  "words": [
    "<string>"
  ],
  "createdAt": "<string>",
  "organizationId": "<string>",
  "userId": "<string>",
  "strict": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

ID of the wordlist to update

Body

application/json
name
string

New name for the wordlist

words
string[]

New words for the wordlist. Replace the existing words with these new ones. Duplicate words will be ignored.

strict
boolean

Deprecated. Now using threshold in project settings.

Response

Wordlist updated successfully

id
string
required

ID of the wordlist

name
string | null
required

Name of the wordlist

words
string[]
required

Words in the wordlist

createdAt
string
required

Creation date of the wordlist

organizationId
string
required

ID of the organization

userId
string | null
required

ID of the user

strict
boolean
required

Strict mode