> ## 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.

# Create a style guide

> Creates a new style guide in your workspace. Sections organize the guide's rules and word list entries — each must have a unique sectionId and a kind of 'rules' or 'wordlist'. If sections is omitted, a default set of sections is used. Use POST /styleguides/rules afterward to add rules to a section.



## OpenAPI

````yaml openapi.json post /styleguides
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:
    post:
      tags:
        - Style guides
      summary: Create a style guide
      description: >-
        Creates a new style guide in your workspace. Sections organize the
        guide's rules and word list entries — each must have a unique sectionId
        and a kind of 'rules' or 'wordlist'. If sections is omitted, a default
        set of sections is used. Use POST /styleguides/rules afterward to add
        rules to a section.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  description: The name of the new style guide.
                description:
                  type: string
                  minLength: 1
                  description: A description of the style guide's purpose.
                sections:
                  type: array
                  items:
                    type: object
                    properties:
                      sectionId:
                        type: string
                      name:
                        type: string
                      kind:
                        type: string
                        enum:
                          - rules
                          - wordlist
                    required:
                      - sectionId
                      - name
                      - kind
                  description: >-
                    Sections to organize rules and word list entries into. Each
                    section's sectionId must be unique within the style guide.
                    Must include at least one 'rules' section and one 'wordlist'
                    section. If omitted, a default set of sections is used.
                enabledByDefault:
                  type: boolean
                  description: >-
                    Whether this style guide is enabled by default for all
                    projects. Defaults to true.
              required:
                - name
                - description
              example:
                name: Acme Inc.
                description: Voice and tone for Acme Inc. product text.
                sections:
                  - sectionId: foundations
                    name: Foundations
                    kind: rules
                  - sectionId: word-list
                    name: Word List
                    kind: wordlist
      responses:
        '200':
          description: Returns the developer ID and name of the created style guide
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The Developer ID of the created style guide
                  name:
                    type: string
                    description: The name of the created style guide
                required:
                  - id
                  - name
                example:
                  id: acme-inc
                  name: Acme Inc.
        '400':
          description: >-
            Returned when the request body fails validation. Common causes
            include: a missing required field (name or description), sections
            missing a 'rules' or 'wordlist' section, or duplicate sectionIds
            within the sections list.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: Error message describing the validation failure
                required:
                  - message
              example:
                message: At least one wordlist section is required
      security:
        - ApiKeyAuth: []
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````