> 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.1/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.1/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.1/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.1/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.1/api-reference/style-guide-api/response-schema.md).

### Errors and validation

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.wproofreader.com/v6.11.1/api-reference/style-guide-api.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
