Getting started
Create a dictionary, add words, and verify the result.
This is the fastest end-to-end flow:
createa dictionary.addwordsto seed the wordlist.getwordsto verify.getdictsto 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.
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."]
}
]
}Next
Learn each operation in Actions.
See the full list of fields in Response format.
Troubleshoot failures in Errors reference.
Last updated
Was this helpful?

