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

# Update Kb



## OpenAPI

````yaml /openapi/openapi.yaml patch /v1/knowledge-bases/{kb_id}
openapi: 3.1.0
info:
  title: OneInbox API
  version: 1.0.0
servers:
  - url: https://api-tokyo.oneinbox.ai
    description: Production (Tokyo ap-northeast-1)
security: []
tags:
  - name: health
  - name: integrations
  - name: llm-models
  - name: tools
  - name: knowledge-bases
  - name: voices
  - name: webhooks
  - name: agents
  - name: phone-numbers
  - name: calls
  - name: workspace
  - name: usage
  - name: audit-events
paths:
  /v1/knowledge-bases/{kb_id}:
    patch:
      tags:
        - knowledge-bases
      summary: Update Kb
      operationId: update_kb_v1_knowledge_bases__kb_id__patch
      parameters:
        - name: kb_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Kb Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeBaseUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeBaseResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - API Key: []
components:
  schemas:
    KnowledgeBaseUpdate:
      properties:
        name:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Name
        chunk_size:
          anyOf:
            - type: integer
              maximum: 4096
              minimum: 64
            - type: 'null'
          title: Chunk Size
        multilingual:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Multilingual
      type: object
      title: KnowledgeBaseUpdate
    KnowledgeBaseResponse:
      properties:
        kb_id:
          type: string
          title: Kb Id
        name:
          type: string
          title: Name
        chunk_size:
          type: integer
          title: Chunk Size
        multilingual:
          type: boolean
          title: Multilingual
        total_tokens:
          type: integer
          title: Total Tokens
          default: 0
        mode:
          type: string
          title: Mode
          default: stuff
        sources:
          items:
            $ref: '#/components/schemas/KBSourceResponse'
          type: array
          title: Sources
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - kb_id
        - name
        - chunk_size
        - multilingual
        - created_at
        - updated_at
      title: KnowledgeBaseResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KBSourceResponse:
      properties:
        source_id:
          type: string
          title: Source Id
        kb_id:
          type: string
          title: Kb Id
        type:
          type: string
          title: Type
        source:
          type: string
          title: Source
        chunk_count:
          type: integer
          title: Chunk Count
        status:
          type: string
          title: Status
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        file_name:
          anyOf:
            - type: string
            - type: 'null'
          title: File Name
        mime_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Mime Type
        file_size:
          anyOf:
            - type: integer
            - type: 'null'
          title: File Size
        token_count:
          type: integer
          title: Token Count
          default: 0
        created_at:
          type: string
          format: date-time
          title: Created At
      type: object
      required:
        - source_id
        - kb_id
        - type
        - source
        - chunk_count
        - status
        - error_message
        - created_at
      title: KBSourceResponse
    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:
    API Key:
      type: http
      description: >-
        Your **API key** sent as a Bearer credential — `Authorization: Bearer
        <api_key>`, where `<api_key>` starts with `oi_sk_` (create one via `POST
        /v1/api-keys`). Although the field is labelled 'token', paste your API
        key here. A dashboard JWT is also accepted on this header for the same
        endpoints.
      scheme: bearer

````