Add word(s) (addword, addwords)

Add one word or a wordlist to a user dictionary.

Add one or more words to a dictionary.

Parameters

These parameters work with any cmd.

Name
Type
Required
Description

serviceid

string

Cloud only

Cloud API key. Required for Cloud requests. Not used on-premises.

format

string

No

Response format. Values: json (default), xml.

callback

string

No

JSONP wrapper function name. Use only with format=json.

short_answer

boolean

No

JSON only. When true, shortens JSON keys to reduce payload size. See boolean parameters.

See Overview for details.

Command specific parameters

Parameter
Type
Required
Default
Notes

cmd

string

Yes

user_dictionary

Command name.

action

string

Yes

addwords

Use addword or addwords.

name

string

Yes

Dictionary name.

word

string

Yes*

Single word to add.

wordlist

string

Yes*

Comma-separated list of words. Takes precedence over word.

* Provide word or wordlist.

Behavior

  • Adds a word or a wordlist.

  • Ignores duplicates depending on deployment, or returns WordAlreadyExistsException.

circle-info

Auto-create behavior.

Some deployments create the dictionary automatically if name does not exist.

wordlist precedence

If wordlist is present and not empty, it overrides word.

Response

Returns the words added in wordlist.

See Response format.

Errors

Common errors:

  • Dictionary name is missing, invalid, or longer than 50 characters.

  • No word was provided, or wordlist is empty.

  • A word contains forbidden symbols.

  • A word is longer than 63 characters.

  • Word already exists in the dictionary.

    • Some deployments ignore duplicates instead of failing.

See Errors reference.

Examples

chevron-rightAdd a single wordhashtag

Request body (JSON):

Response (JSON):

chevron-rightAdd multiple wordshashtag

Request body (JSON):

Response (JSON):

Last updated

Was this helpful?