# Response format

Every action returns a JSON or XML payload.

JSON responses use a `result` array.

### Envelope

```json
{
  "result": [
    {
      "status": "success",
      "message": ["..."]
    }
  ]
}
```

* `getdicts` can return multiple array elements (one per dictionary).
* All other actions return exactly one element.

### `status` values

* `success`: the operation completed.
* `warning`: the operation partially succeeded.
* `error`: the operation failed.

{% hint style="info" %}
For `warning`, check `message`.

For word operations, warnings usually list which words were skipped.
{% endhint %}

### Fields

These are the fields you can see in `result[]` objects.

| Field         | Type             | Meaning                                   |
| ------------- | ---------------- | ----------------------------------------- |
| `id`          | integer          | Numeric dictionary ID.                    |
| `lang`        | string           | Dictionary language.                      |
| `description` | string           | Dictionary label.                         |
| `wordlist`    | array of strings | Words returned or affected by the action. |
| `count`       | integer          | Word count (when present).                |
| `state`       | boolean          | Enabled state (when present).             |
| `status`      | string           | `success`, `warning`, or `error`.         |
| `message`     | array of strings | Human-readable messages.                  |

### Which actions include which fields

* `wordlist` appears in: `create`, `addwords`, `deletewords`, `getwords`.
* `count` appears in: `getwords`, `getdicts`.
* `state` appears in: `getdicts`, `edit`.

{% hint style="info" %}
`getdicts` returns metadata only. Use `getwords` to fetch the word list.
{% endhint %}


---

# 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/v6.12.0/api-reference/custom-dictionary-api/response-format.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.
