# Getting started

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

Use the shared endpoint and request formats.

See [HTTP API Overview](/api-reference/overview.md).

{% stepper %}
{% step %}

#### Create a dictionary

Request body (JSON):

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

Optional: create with an initial wordlist:

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

Response (JSON):

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

Possible errors:

* `DictionaryAlreadyExistsException`
* `InvalidUserDictName`
  {% endstep %}

{% step %}

#### Add your first words

Request body (JSON):

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

Or add multiple words:

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

Response (JSON):

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

{% hint style="info" %}
`addword` / `addwords` can auto-create the dictionary if it does not exist.
{% endhint %}
{% endstep %}

{% step %}

#### Verify the dictionary exists (`check`)

Request body (JSON):

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

Response (JSON):

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

{% endstep %}

{% step %}

#### Fetch the full wordlist (`getdict`)

Request body (JSON):

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

Response (JSON):

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

{% endstep %}
{% endstepper %}

### Next

* Use [Actions](/api-reference/user-custom-dictionary-api/actions.md) to see all available actions.
* Use [Parameters reference](/api-reference/user-custom-dictionary-api/parameters-reference.md) to see all parameters.
* Use [Errors reference](/api-reference/user-custom-dictionary-api/errors-reference.md) to handle failures.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.wproofreader.com/api-reference/user-custom-dictionary-api/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
