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

# Add URL to Knowledge Base Item

> Adds a new URL to an existing knowledge base URL item for processing.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/voice-agents/knowledge-base/{id}/url
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}/url:
    post:
      summary: Add URL to Knowledge Base URL Item.
      description: Adds a new URL to an existing knowledge base URL item for processing.
      parameters:
        - in: path
          name: id
          required: true
          description: UUID of the knowledge base item.
          schema:
            type: string
            format: uuid
            example: d949f13f-40d2-4e48-ac86-b66633070603
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddUrlToKbItemRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddUrlToKbItemResponse'
        '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:
    AddUrlToKbItemRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
          description: The URL to be added to the knowledge base item.
          example: https://example.com/page
      required:
        - url
    AddUrlToKbItemResponse:
      type: object
      properties:
        success:
          type: boolean
          example: true
        message:
          type: string
          example: URL added successfully to knowledge base item
        messageKey:
          type: string
          example: URL_ADDED_SUCCESSFULLY
    ErrorSchema:
      type: object
      properties:
        code:
          type: integer
        message:
          type: string
  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>'

````