Skip to content

Update a wordlist

PATCH/v1/wordlists/{id}Key scope write

Updates the properties sent and leaves the others unchanged. The slug, and with it the policy key, cannot be changed.

Needs a key with the write scope. Authentication

curl -X PATCH https://api.useinfrared.com/v1/wordlists/wl_5KcJIqikl2tXcuKJHvpzgO \
  -H "Authorization: Bearer $INFRARED_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Items that cannot be listed in any category."
  }'
200 OKResponse
{
  "object": "wordlist",
  "id": "wl_5KcJIqikl2tXcuKJHvpzgO",
  "project_id": "prj_0TBAgHGtdMketrbltGFHuk",
  "slug": "restricted-items",
  "policy": "wordlist/restricted-items",
  "name": "Restricted items",
  "description": "Items that cannot be listed in any category.",
  "mode": "block",
  "match_preset": "similar",
  "language": null,
  "enabled": true,
  "entries_count": 3,
  "created_at": "2026-10-08T09:29:26.558Z",
  "updated_at": "2026-10-08T09:29:29.490Z"
}

Path parameters

idstringRequired

Id of the wordlist: wl_ plus 22 base62 characters.

Request body

namestring

A name for the list, 1 to 200 characters.

descriptionstring

A note on what the list is for, up to 2,000 characters. Null clears it.

modeenum

What a match means: block, require or collect, as described for creating a wordlist.

One ofblockrequirecollect

match_presetenum

How close a word must be to a single-word term to match: exact, same_word, similar or nearest, as described for creating a wordlist.

One ofexactsame_wordsimilarnearest

languagestring

A language code of up to 8 characters, for your own reference. Null clears it.

enabledboolean

Whether the list is matched. A disabled list scores 0 on the templates that enable it.

Returns

The updated wordlist. Results are cached for 6 hours per identical text, so a change can take that long to reach text that was moderated before it.

Errors

404
not_found

The key's project has no wordlist with this id.

422
validation_error

A value is empty or too long, mode or match_preset is not one of the listed values, or the body has an unknown key.

Every endpoint can also answer the errors any request can meet: a missing key, a rate limit, a malformed body. Errors

Something missing or unclear on this page? Write to support@useinfrared.com.