Getting started

Create a dictionary, add words, and verify the result.

This is the fastest end-to-end flow:

  1. create a dictionary.

  2. addwords to seed the wordlist.

  3. getwords to verify.

  4. getdicts to list dictionaries and states.

If you’re new to this API, read Overview first.

1

1) Create a dictionary

Use create to create a new dictionary.

Required: lang, description.

circle-info

Save the id from the response.

You need it for all follow-up requests.

Example (JSON):

{
    "cmd": "custom_dictionary",
    "access_key": "...",
    "lang": "en_US",
    "action": "create",
    "description": "My first dictionary"
}

Example response (JSON):

{
  "result": [
    {
      "id": 101565,
      "lang": "en_US",
      "description": "My first dictionary",
      "wordlist": [],
      "status": "success",
      "message": ["Dictionary created."]
    }
  ]
}
2

2) Add initial words

Use addwords to add a wordlist to existing dictionary.

Required: id, wordlist.

{
    "cmd": "custom_dictionary",
    "access_key": "...",
    "lang": "en_US",
    "action": "addwords",
    "id": 101565,
    "wordlist": "word1,word2"
}

Example response:

{
  "result": [
    {
      "id": 101565,
      "lang": "en_US",
      "description": "My first dictionary",
      "wordlist": ["word1", "word2"],
      "status": "success",
      "message": ["Words added."]
    }
  ]
}
3

3) Verify words

Use getwords to fetch the full wordlist.

{
    "cmd": "custom_dictionary",
    "access_key": "...",
    "action": "getwords",
    "id": 101565
}

Example response:

{
  "result": [
    {
      "id": 101565,
      "lang": "en_US",
      "description": "My first dictionary",
      "wordlist": ["word1", "word2"],
      "count": 3,
      "status": "success",
      "message": ["Wordlist extracted."]
    }
  ]
}
4

4) List dictionaries

Use getdicts to list dictionaries and their state.

{
    "cmd": "custom_dictionary",
    "access_key": "...",
    "action": "getdicts",
    "id": 101565
}

Example response:

{
  "result": [
    {
      "id": 101565,
      "lang": "en_US",
      "description": "My first dictionary",
      "count": 2,
      "state": true,
      "status": "success",
      "message": ["Dictionaries extracted."]
    }
  ]
}
circle-info

getdicts does not include wordlist.

Use getwords for the actual words.

Next

Last updated

Was this helpful?