Getting started

Create a dictionary, add words, and verify it works.

This flow creates a dictionary, adds words, and verifies the result.

Use the shared endpoint and request formats.

See HTTP API Overview.

1

Create a dictionary

Request body (JSON):

{
  "cmd": "user_dictionary",
  "action": "create",
  "name": "my_dict"
}

Optional: create with an initial wordlist:

{
  "cmd": "user_dictionary",
  "action": "create",
  "name": "my_dict",
  "wordlist": "WebSpellChecker,WProofreader"
}

Response (JSON):

{
  "name": "my_dict",
  "action": "create",
  "wordlist": ["WebSpellChecker", "WProofreader"],
  "modificationTime": 1772124021
}

Possible errors:

  • DictionaryAlreadyExistsException

  • InvalidUserDictName

2

Add your first words

Request body (JSON):

{
  "cmd": "user_dictionary",
  "action": "addwords",
  "name": "my_dict",
  "word": "API"
}

Or add multiple words:

{
  "cmd": "user_dictionary",
  "action": "addwords",
  "name": "my_dict",
  "wordlist": "API,SDK,DevOps"
}

Response (JSON):

{
  "name": "my_dict",
  "action": "addword",
  "wordlist": ["API", "SDK", "DevOps"],
  "modificationTime": 1772124069
}
circle-info

addword / addwords can auto-create the dictionary if it does not exist.

3

Verify the dictionary exists (check)

Request body (JSON):

{
  "cmd": "user_dictionary",
  "action": "check",
  "name": "my_dict"
}

Response (JSON):

{
  "name": "my_dict",
  "action": "check",
  "wordlist": [],
  "modificationTime": 1772124069
}
4

Fetch the full wordlist (getdict)

Request body (JSON):

{
  "cmd": "user_dictionary",
  "action": "getdict",
  "name": "my_dict"
}

Response (JSON):

{
  "name": "my_dict",
  "action": "getdict",
  "wordlist": ["API", "DevOps", "SDK"],
  "modificationTime": 1772124069
}

Next

Last updated

Was this helpful?