Add terms
POST/v1/wordlists/{id}/termsKey scope write
Adds up to 5,000 terms to a wordlist in one request. Terms are compared in their normalised form: a term that normalises to one already in the list updates that entry, and a repeat inside the same request is skipped.
Needs a key with the write scope. Authentication
Path parameters
idstringRequiredId of the wordlist:
wl_plus 22 base62 characters.
Request body
termsarray of string or objectsRequiredThe terms to add, 1 to 5,000 items. Each item is a string of 1 to 200 characters, or an object with
termand optionallycanonicalandnotes. A term with a space is matched as an exact phrase. Any other term is compared word by word, where a word is a run of letters and digits, so a hyphenated term without a space does not match.
Returns
An object with the counts created, updated and skipped, entries_count (the number of terms now in the list) and object set to wordlist_terms_result, with status 201. Results are cached for 6 hours per identical text, so new terms can take that long to reach text that was moderated before them.
- 201 CreatedAn object
Errors
- 404
not_foundThe key's project has no wordlist with this id.
- 422
validation_errortermsis empty or has more than 5,000 items, or a term is empty or longer than 200 characters.
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.