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

# Update Knowledge Base

> Update knowledge base metadata (name, description).



## OpenAPI

````yaml /api-reference/openapi.json patch /knowledge-bases/{kb_id}
openapi: 3.1.0
info:
  title: Truedy API
  description: >-
    Truedy Public API - Build voice AI agents and make automated phone calls.


    ## Authentication

    All requests require **Authorization: Bearer <your_api_key>**.

    Get your API key from the [Truedy Dashboard](https://app.truedy.ai).


    ## Response Format

    All successful responses follow this format:

    ```json

    {
      "data": { /* resource or list of resources */ },
      "meta": {
        "request_id": "req_xxx",
        "ts": "2026-03-03T20:30:21.310278Z"
      },
      "pagination": { /* optional, for list endpoints */ }
    }

    ```


    ## Error Handling

    Errors return appropriate HTTP status codes with structured error messages.
    Always check the `error` field in the response body for details.
  version: 1.0.0
servers:
  - url: https://api.truedy.ai/api/public/v1
    description: Truedy Public API
security:
  - BearerAuth: []
paths:
  /knowledge-bases/{kb_id}:
    patch:
      tags:
        - Knowledge Bases
      summary: Update Knowledge Base
      description: Update knowledge base metadata (name, description).
      operationId: update_knowledge_base
      parameters:
        - name: kb_id
          in: path
          required: true
          description: Knowledge base ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeBaseUpdateRequest'
            examples:
              update:
                summary: Update knowledge base name
                value:
                  name: Updated Product FAQ
                  description: Updated description
      responses:
        '200':
          description: Knowledge base updated successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - meta
                properties:
                  data:
                    $ref: '#/components/schemas/KnowledgeBaseResponse'
                  meta:
                    $ref: '#/components/schemas/ResponseMeta'
              example:
                data:
                  id: kb_x9y8z7w6
                  name: Product FAQ v2
                  description: Frequently asked questions about our product line
                  status: ready
                  source_count: 12
                  chunk_count: 847
                  embedding_model: text-embedding-3-small
                  created_at: '2026-03-01T09:00:00Z'
                  updated_at: '2026-04-05T10:22:00Z'
                meta:
                  request_id: req_32e7531c
                  ts: '2026-04-05T10:22:00Z'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Knowledge base not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    KnowledgeBaseUpdateRequest:
      type: object
      properties:
        name:
          minLength: 1
          maxLength: 255
          description: Updated name
          example: Updated Documentation
          type:
            - string
            - 'null'
        description:
          maxLength: 1000
          description: Updated description
          example: Updated description
          type:
            - string
            - 'null'
    KnowledgeBaseResponse:
      type: object
      required:
        - id
        - name
        - status
        - created_at
        - updated_at
      properties:
        id:
          type: string
          description: Unique knowledge base identifier
          example: kb_x9y8z7w6
        name:
          type: string
          description: Display name of the knowledge base
          example: Product Documentation
        description:
          description: Optional description
          example: Complete product manual and FAQs
          type:
            - string
            - 'null'
        status:
          type: string
          enum:
            - creating
            - ready
            - failed
          description: Knowledge base status
          example: ready
        language:
          description: Content language code
          example: en-US
          type:
            - string
            - 'null'
        file_name:
          description: Original file name if created from upload
          example: manual.pdf
          type:
            - string
            - 'null'
        file_type:
          enum:
            - pdf
            - txt
            - docx
            - md
          description: File type
          example: pdf
          type:
            - string
            - 'null'
        file_size:
          description: File size in bytes
          example: 1048576
          type:
            - integer
            - 'null'
        created_at:
          type: string
          format: date-time
          description: When the knowledge base was created
          example: '2026-03-03T20:30:21.310278Z'
        updated_at:
          type: string
          format: date-time
          description: When the knowledge base was last updated
          example: '2026-03-03T20:30:21.310278Z'
    ResponseMeta:
      type: object
      required:
        - request_id
        - ts
      properties:
        request_id:
          type: string
          description: Unique request identifier for debugging and support
          example: req_32e7531c-8
        ts:
          type: string
          format: date-time
          description: Server timestamp when the response was generated
          example: '2026-03-03T20:30:21.310278Z'
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Error code
              example: not_found
            message:
              type: string
              description: Human-readable error message
              example: The requested resource does not exist
            details:
              description: Additional error context
              example:
                resource: agent
                id: agt_invalid
              type:
                - object
                - 'null'
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            type: object
            properties:
              loc:
                type: array
              msg:
                type: string
              type:
                type: string
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key authentication. Include your API key in the Authorization
        header: Bearer <your_api_key>

````