> ## Documentation Index
> Fetch the complete documentation index at: https://developer.dittowords.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These are Ditto's developer docs. Ditto is a single source of truth for product copy across design, review, localization, and code.
> The first step on any codebase is a scan: https://developer.dittowords.com/get-started/scan-your-repo.md. That page also covers reviewing the style guide Ditto drafts from the scan. After it, the follow-on guides are Connect Figma files and Set up localization (under /guides/) and Connect the Ditto MCP (the Setup page of the MCP reference).
> Two different MCP servers: the Ditto MCP server at https://api.dittowords.com/v2/mcp gives an agent a workspace's text and style guide rules; the documentation MCP server at https://developer.dittowords.com/mcp searches these docs.
> Prefer logging in with a Ditto account (npx -y @dittowords/cli@latest login; OAuth in MCP clients) over API keys. API keys are for CI and headless clients only.
> Commands are complete as written and use npx -y @dittowords/cli@latest; nothing needs a global install.

# Update style guide rules

> Updates a set of style guide rules, each identified by its Developer ID.

Only provided fields are modified. The operation is all-or-nothing: if any update is invalid, none are applied.



## OpenAPI

````yaml openapi.json patch /styleguides/rules
openapi: 3.0.0
info:
  version: 1.0.0
  title: Ditto API
  description: Programmatically read and write data in your Ditto workspace.
servers:
  - url: https://api.dittowords.com/v2
security: []
paths:
  /styleguides/rules:
    patch:
      tags:
        - Style guides
      summary: Update style guide rules
      description: >-
        Updates a set of style guide rules, each identified by its Developer ID.


        Only provided fields are modified. The operation is all-or-nothing: if
        any update is invalid, none are applied.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                updates:
                  type: array
                  items:
                    anyOf:
                      - type: object
                        properties:
                          ruleId:
                            type: string
                            minLength: 1
                            description: >-
                              Developer ID of the rule to update (from POST
                              /styleguides/rules or GET /styleguides).
                          description:
                            type: string
                            description: >-
                              Updated description. If not provided, description
                              remains unchanged.
                          tags:
                            type: array
                            items:
                              type: string
                            description: Replaces all existing tags.
                          enabled:
                            type: boolean
                            description: Whether the rule is enabled.
                          name:
                            type: string
                            minLength: 1
                            description: >-
                              Updated name. Only valid for rules in a 'rules'
                              section.
                          examples:
                            type: array
                            items:
                              type: object
                              properties:
                                from:
                                  type: string
                                  description: Text that violates the rule.
                                to:
                                  type: string
                                  description: Corrected version of the text.
                              required:
                                - from
                                - to
                            description: >-
                              Replaces all existing examples. Only valid for
                              rules in a 'rules' section.
                        required:
                          - ruleId
                        additionalProperties: false
                        title: Rule
                      - type: object
                        properties:
                          ruleId:
                            type: string
                            minLength: 1
                            description: >-
                              Developer ID of the rule to update (from POST
                              /styleguides/rules or GET /styleguides).
                          description:
                            type: string
                            description: >-
                              Updated description. If not provided, description
                              remains unchanged.
                          tags:
                            type: array
                            items:
                              type: string
                            description: Replaces all existing tags.
                          enabled:
                            type: boolean
                            description: Whether the rule is enabled.
                          term:
                            type: string
                            minLength: 1
                            description: >-
                              Updated preferred term. Only valid for rules in a
                              'wordlist' section.
                          disallowed:
                            type: array
                            items:
                              type: string
                            description: >-
                              Replaces all existing disallowed words/phrases.
                              Only valid for rules in a 'wordlist' section.
                        required:
                          - ruleId
                        additionalProperties: false
                        title: Word list rule
                  minItems: 1
                  description: >-
                    Rules to update, identified by ruleId. Only provided fields
                    are changed. Use 'name'/'examples' for a rule in a 'rules'
                    section, or 'term'/'disallowed' for a rule in a 'wordlist'
                    section — the shape must match that rule's own section.
              required:
                - updates
              example:
                updates:
                  - ruleId: be-concise
                    description: Updated description
            examples:
              update_style_rule:
                summary: Update a rule in a 'rules' section
                value:
                  updates:
                    - ruleId: be-concise
                      name: Be extremely concise
                      examples:
                        - from: Please click the button below
                          to: Click below
              update_wordlist_entry:
                summary: Update an entry in a 'wordlist' section
                value:
                  updates:
                    - ruleId: ai-agent
                      term: AI agent
                      disallowed:
                        - bot
                        - chatbot
                        - virtual assistant
              disable_rule:
                summary: Disable a rule without deleting it
                value:
                  updates:
                    - ruleId: be-concise
                      enabled: false
      responses:
        '200':
          description: Returns success status of the update operation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates whether the update was successful
                required:
                  - success
                example:
                  success: true
        '400':
          description: >-
            Returned when the request body fails validation. Common causes
            include: providing both 'name' and 'term' (or both 'examples' and
            'disallowed') for the same update, or a field that doesn't match the
            rule's own section kind (e.g. 'term' for a rule in a 'rules'
            section).
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - message
              example:
                message: >-
                  Rule 'be-concise' is in a rules section; use 'name'/'examples'
                  instead of 'term'/'disallowed'.
        '404':
          description: Returned when a ruleId does not match any rule in the workspace
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - message
              example:
                message: 'Rule id not found: missing-rule'
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.