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

# Update a style guide

> Updates the content of an existing style guide.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/avido/openapi.documented.yml put /v0/style-guides/{id}
openapi: 3.1.1
info:
  title: Avido API
  description: >-
    Avido's API for LLM usage events, tool calls, trace management, webhook
    validation, and more. See each endpoint's request/response schema for
    details.
  version: 0.1.0
  contact:
    name: Avido Support
    email: support@avidoai.com
    url: https://avidoai.com/support
servers:
  - url: https://api.avidoai.com
    description: Production API
security:
  - ApiKey: []
    ApplicationId: []
paths:
  /v0/style-guides/{id}:
    put:
      tags:
        - Style Guides
      summary: Update a style guide
      description: Updates the content of an existing style guide.
      operationId: updateStyleGuide
      parameters:
        - in: path
          name: id
          schema:
            type: string
            format: uuid
            pattern: >-
              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            description: The unique identifier of the style guide
            example: 123e4567-e89b-12d3-a456-426614174000
          required: true
          description: The unique identifier of the style guide
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateStyleGuideRequest'
      responses:
        '200':
          description: Successfully updated style guide
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StyleGuideResponse'
        '400':
          description: bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Style guide not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound:
                  summary: Style guide not found
                  value:
                    message: Style guide not found
        '422':
          description: invalid input
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '500':
          description: internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Avido from 'avido';


            const client = new Avido({
              apiKey: process.env['AVIDO_API_KEY'], // This is the default and can be omitted
              applicationID: process.env['AVIDO_APPLICATION_ID'], // This is the default and can be omitted
            });


            const styleGuide = await
            client.styleGuides.update('123e4567-e89b-12d3-a456-426614174000', {
              content: [{ content: 'Use professional and clear language', heading: 'Tone' }],
            });


            console.log(styleGuide.data);
        - lang: Python
          source: |-
            import os
            from avido import Avido

            client = Avido(
                api_key=os.environ.get("AVIDO_API_KEY"),  # This is the default and can be omitted
                application_id=os.environ.get("AVIDO_APPLICATION_ID"),  # This is the default and can be omitted
            )
            style_guide = client.style_guides.update(
                id="123e4567-e89b-12d3-a456-426614174000",
                content=[{
                    "content": "Use professional and clear language",
                    "heading": "Tone",
                }],
            )
            print(style_guide.data)
components:
  schemas:
    UpdateStyleGuideRequest:
      type: object
      properties:
        content:
          type: array
          items:
            $ref: '#/components/schemas/StyleGuideSectionInput'
      required:
        - content
      additionalProperties: false
      title: UpdateStyleGuideRequest
      description: Request body for updating a style guide
    StyleGuideResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/StyleGuideOutput'
      required:
        - data
      additionalProperties: false
      title: Style Guide Response
      description: Successful response containing the style guide data
    ErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message explaining the error.
          example: Resource not found
      required:
        - message
      additionalProperties: false
      title: ErrorResponse
      description: Standard error format for failed API operations.
    ValidationErrorResponse:
      type: object
      properties:
        message:
          type: string
          description: A human-readable error message indicating what went wrong.
          example: Invalid request data
        issues:
          type: array
          items:
            type: object
            properties:
              code:
                type: string
              message:
                type: string
              path:
                type: array
                items:
                  type: string
            required:
              - code
              - message
              - path
            additionalProperties: false
          description: Array of detailed validation error objects.
          example:
            - code: invalid_string
              message: Invalid UUID
              path:
                - id
      required:
        - message
        - issues
      additionalProperties: false
      title: ValidationErrorResponse
      description: Details about validation errors in incoming requests.
    StyleGuideSectionInput:
      type: object
      properties:
        heading:
          type: string
          description: The heading of the section
        content:
          type: string
          description: The content of the section in markdown
        approved:
          default: false
          description: Whether or not the section has been approved
          type: boolean
      required:
        - heading
        - content
      title: Style Guide Section Input
      description: A section for a style guide (input with default)
      example:
        heading: Tone
        content: Use professional and clear language
        approved: true
    StyleGuideOutput:
      type: object
      properties:
        id:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: The unique identifier of the style guide
          example: 123e4567-e89b-12d3-a456-426614174000
        createdAt:
          description: When the style guide was created
          example: '2024-01-05T12:34:56.789Z'
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        modifiedAt:
          description: When the style guide was last modified
          example: '2024-01-05T12:34:56.789Z'
          type: string
          format: date-time
          pattern: >-
            ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
        orgId:
          type: string
          description: The organization ID this style guide belongs to
          example: org-123
        applicationId:
          type: string
          format: uuid
          pattern: >-
            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
          description: The application ID this style guide belongs to
          example: 456e4567-e89b-12d3-a456-426614174000
        content:
          type: array
          items:
            $ref: '#/components/schemas/StyleGuideSectionOutput'
      required:
        - id
        - createdAt
        - modifiedAt
        - orgId
        - applicationId
        - content
      additionalProperties: false
      title: Style Guide
      description: A style guide for a specific application
    StyleGuideSectionOutput:
      type: object
      properties:
        heading:
          type: string
          description: The heading of the section
        content:
          type: string
          description: The content of the section in markdown
        approved:
          type: boolean
          description: Whether or not the section has been approved
      required:
        - heading
        - content
        - approved
      additionalProperties: false
      title: Style Guide Section
      description: A section for a style guide
      example:
        heading: Tone
        content: Use professional and clear language
        approved: true
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: Your unique Avido API key
    ApplicationId:
      type: apiKey
      in: header
      name: x-application-id
      description: Your unique Avido Application ID

````