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

# Create Document



## OpenAPI

````yaml /openapi.json post /api/workspaces/{id}/documents
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:
    post:
      tags:
        - documents
      summary: Create Document
      operationId: create_document_api_workspaces__id__documents_post
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateDocumentRequest'
      responses:
        '201':
          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:
    CreateDocumentRequest:
      properties:
        title:
          type: string
          title: Title
        content:
          type: string
          title: Content
          default: ''
        visibility:
          type: string
          enum:
            - human-only
            - agent-visible
          title: Visibility
          default: agent-visible
        injection:
          type: string
          enum:
            - none
            - reference
            - inline
            - must-read
          title: Injection
          default: none
      type: object
      required:
        - title
      title: CreateDocumentRequest
    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

````