> For the complete documentation index, see [llms.txt](https://docs.wproofreader.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wproofreader.com/v6.11.0/api-reference/style-guide-api.md).

# Style guide API

Manage custom style guide rules over the HTTP API.

This command is action-based (not REST).

**Command name:** `style_guide`

See [HTTP API Overview](/v6.11.0/api-reference/overview.md) for endpoint, methods, and formats.

{% hint style="info" %}
An **access key** is **required** for this command. See [Access key](/v6.11.0/deployment/configuration/application-server/access-key.md).
{% endhint %}

### Rule identity and language

A style guide rule is scoped by **language**.

To uniquely target a rule, you need both:

* `lang` (language scope)
* `rule` (rule ID)

`lang` defaults to `common`.

It can also be:

* a language code like `en_US`
* a language group like `en`

### Common parameters

Every action uses parameters listed below. For common parameters for all commands, see [HTTP API Overview](/v6.11.0/api-reference/overview.md).

| Parameter | Type   | Required | Default       | Notes                                                                               |
| --------- | ------ | -------- | ------------- | ----------------------------------------------------------------------------------- |
| `cmd`     | string | Yes      | `style_guide` | Command name.                                                                       |
| `action`  | string | Yes      |               | One of the actions below.                                                           |
| `lang`    | string | No       | `common`      | Language scope for the rule set. Use `en_US` or `en` to target a specific language. |
| `rule`    | string | Yes      |               | Comma-separated list of rules                                                       |

{% hint style="info" %}
If you only know the text pattern but don’t have a rule ID yet, start with `getrules`.
{% endhint %}

{% hint style="warning" %}
`lang` is part of the rule identity. Same `rule` ID in a different `lang` scope is treated as a different target.
{% endhint %}

### Actions

<table data-view="cards"><thead><tr><th>Action</th><th>Description</th><th data-card-target data-type="content-ref">Docs</th></tr></thead><tbody><tr><td><strong>Add rule</strong></td><td>Creates a new rule.</td><td><a href="/pages/fqBJTWf8oZ0XVgLaws1f">/pages/fqBJTWf8oZ0XVgLaws1f</a></td></tr><tr><td><strong>Get rules</strong></td><td>Lists rules in the <code>lang</code> scope.</td><td><a href="/pages/EO01Q73cTV6fdcyanJiq">/pages/EO01Q73cTV6fdcyanJiq</a></td></tr><tr><td><strong>Delete rule(s)</strong></td><td>Deletes rule(s) by ID and language.</td><td><a href="/pages/qnadt698valY0hr9x3Up">/pages/qnadt698valY0hr9x3Up</a></td></tr><tr><td><strong>Edit rule</strong></td><td>Updates an existing rule by ID and language.</td><td><a href="/pages/aBLrJpDr5Vd5KiovzIC3">/pages/aBLrJpDr5Vd5KiovzIC3</a></td></tr></tbody></table>

### Response format

Success responses share the same envelope and rule object schema.

See [Response schema](/v6.11.0/api-reference/style-guide-api/response-schema.md).

### Errors and validation

* [Errors](/v6.11.0/api-reference/style-guide-api/errors.md)
* [Validation & limits](/v6.11.0/api-reference/style-guide-api/validation-and-limits.md)
