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

# Update a document content in KB



## OpenAPI

````yaml https://blackbox.dasha.ai/swagger/v1/swagger.json post /api/v1/rag/document/{id}
openapi: 3.0.4
info:
  title: Dasha BlackBox Agent API
  description: API for managing AI agents and calls
  contact:
    name: DashaAI Team
    email: support@dasha.ai
  version: v1
servers:
  - url: https://blackbox.dasha.ai
    description: Dasha BlackBox Agent API
security:
  - ApiKey: []
  - OAuth: []
tags:
  - name: ActivityLogs
  - name: Agents
  - name: AgentTestCases
  - name: CallResults
  - name: Calls
  - name: Chats
  - name: Copilot
  - name: CustomerData
  - name: Mcp
  - name: Media
  - name: Misc
  - name: PronunciationDictionaries
  - name: Providers
  - name: SipAliases
  - name: SipCredentials
  - name: SipPhoneNumbers
  - name: TextChat
  - name: TwilioProvider
  - name: Voice
  - name: WebhookTest
  - name: WebIntegrations
  - name: WebSocket
    description: WebSocket endpoints for real-time communication
paths:
  /api/v1/rag/document/{id}:
    post:
      tags:
        - Document
      summary: Update a document content in KB
      parameters:
        - name: id
          in: path
          description: Knowledge base ID
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
            encoding:
              file:
                style: form
      responses:
        '201':
          description: Created
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/DocumentUploadResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/DocumentUploadResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/DocumentUploadResponse'
        '400':
          description: Bad Request
          content:
            text/plain:
              schema: {}
            application/json:
              schema: {}
            text/json:
              schema: {}
        '404':
          description: Not Found
          content:
            text/plain:
              schema: {}
            application/json:
              schema: {}
            text/json:
              schema: {}
        '413':
          description: Content Too Large
          content:
            text/plain:
              schema: {}
            application/json:
              schema: {}
            text/json:
              schema: {}
        '500':
          description: Internal Server Error
          content:
            text/plain:
              schema: {}
            application/json:
              schema: {}
            text/json:
              schema: {}
components:
  schemas:
    DocumentUploadResponse:
      type: object
      properties:
        documentId:
          type: string
          format: uuid
        knowledgeBaseId:
          type: string
          format: uuid
        sizeBytes:
          type: integer
          format: int64
        contentHash:
          type: string
          nullable: true
        status:
          allOf:
            - $ref: '#/components/schemas/DocumentStatus'
        uploadedAt:
          type: string
          format: date-time
        wasDuplicate:
          type: boolean
        existingDocumentId:
          type: string
          format: uuid
          nullable: true
      additionalProperties: false
    DocumentStatus:
      enum:
        - Uploaded
        - Queued
        - Processing
        - Indexed
        - Failed
        - Cancelled
        - PendingDelete
        - Deleting
      type: string
  securitySchemes:
    ApiKey:
      type: http
      description: API Key Authentication (Bearer {key})
      scheme: Bearer
    OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://auth.dasha.ai/connect/authorize
          scopes:
            platform_api: Platform API

````