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

# Get Knowledge Base Item by ID

> Retrieves detailed information about a specific knowledge base item.



## OpenAPI

````yaml /api-reference/openapi.json get /v1/voice-agents/knowledge-base/{id}
openapi: 3.0.1
info:
  title: Hamsa API
  description: Trying out our transcription and media-to-text APIs
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.tryhamsa.com
security: []
paths:
  /v1/voice-agents/knowledge-base/{id}:
    get:
      summary: Get Knowledge Base Item by ID.
      description: Retrieves detailed information about a specific knowledge base item.
      parameters:
        - in: path
          name: id
          required: true
          description: UUID of the knowledge base item to retrieve.
          schema:
            type: string
            format: uuid
            example: d949f13f-40d2-4e48-ac86-b66633070603
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetKnowledgeBaseItemResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '404':
          description: Knowledge base item not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
        '500':
          description: Server Side Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorSchema'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GetKnowledgeBaseItemResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: Success
        data:
          $ref: '#/components/schemas/KnowledgeBaseItem'
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
    KnowledgeBaseItem:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the knowledge base item.
          example: 550e8400-e29b-41d4-a716-446655440000
        userId:
          type: string
          description: The user ID associated with the knowledge base item.
          example: 550e8400-e29b-41d4-a716-446655440000
        projectId:
          type: string
          description: The project ID associated with the knowledge base item.
          example: 550e8400-e29b-41d4-a716-446655440000
        itemName:
          type: string
          description: The name of the knowledge base item.
          example: Product Documentation
        fileSize:
          type: string
          description: The size of the file.
          example: 2.5MB
        type:
          type: string
          description: The type of the knowledge base item.
          enum:
            - TEXT
            - URL
            - FILE
          example: TEXT
        status:
          type: string
          description: The current status of the knowledge base item.
          example: PROCESSED
        failureReason:
          type: string
          description: The reason for failure if the item processing failed.
          example: File format not supported
        content:
          type: string
          description: The text content of the knowledge base item.
          example: This is the content of the knowledge base item...
        itemUrl:
          type: string
          description: The URL of the knowledge base item.
          example: https://example.com/document.pdf
        itemUrls:
          type: array
          description: The URLs of the item (required when the type is URL).
          items:
            type: string
            description: The URL item of the URLs array (required when the type is URL).
            example: https://example.com/document.pdf
          example:
            - https://example.com/document.pdf
        wordsNumber:
          type: number
          description: The words count in the knowledge base item.
          example: 1298
        extension:
          type: string
          description: The extension of the knowledge base item in case it was a file.
          example: 1298
        createdAt:
          type: string
          format: date-time
          description: The timestamp when the knowledge base item was created.
          example: '2024-01-15T10:30:00Z'
        isActive:
          type: boolean
          description: >-
            Indicates whether the knowledge base item is currently active in any
            voice agent.
          example: true
        used:
          type: boolean
          description: >-
            Indicates whether the knowledge base item is currently used in any
            voice agent. Can be used in filtering.
          example: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Pass the API key in the Authorization header, You need to put Token
        keyword before the API key. e.g. 'Authorization: Token <api-key>'

````