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

# Update Document



## OpenAPI

````yaml /openapi.json put /api/workspaces/{id}/documents/{doc_id}
openapi: 3.1.0
info:
  title: Konduktor
  version: 0.1.0
servers:
  - url: http://localhost:8080
    description: Local instance (default)
security: []
paths:
  /api/workspaces/{id}/documents/{doc_id}:
    put:
      tags:
        - documents
      summary: Update Document
      operationId: update_document_api_workspaces__id__documents__doc_id__put
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
        - name: doc_id
          in: path
          required: true
          schema:
            type: string
            title: Doc Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDocumentRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    UpdateDocumentRequest:
      properties:
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
        visibility:
          anyOf:
            - type: string
              enum:
                - human-only
                - agent-visible
            - type: 'null'
          title: Visibility
        injection:
          anyOf:
            - type: string
              enum:
                - none
                - reference
                - inline
                - must-read
            - type: 'null'
          title: Injection
      type: object
      title: UpdateDocumentRequest
    DocumentResponse:
      properties:
        id:
          type: string
          title: Id
        workspace_id:
          type: string
          title: Workspace Id
        title:
          type: string
          title: Title
        content:
          type: string
          title: Content
        visibility:
          type: string
          enum:
            - human-only
            - agent-visible
          title: Visibility
        injection:
          type: string
          enum:
            - none
            - reference
            - inline
            - must-read
          title: Injection
        created_at:
          type: string
          title: Created At
        updated_at:
          type: string
          title: Updated At
      type: object
      required:
        - id
        - workspace_id
        - title
        - content
        - visibility
        - injection
        - created_at
        - updated_at
      title: DocumentResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````