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

# Upload Url Items

> Index web URLs as knowledge items.
Each URL is crawled, parsed, and indexed asynchronously.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/knowledge/item/url
openapi: 3.1.0
info:
  title: Diga API
  version: 0.1.0
servers:
  - url: https://api.diga.io
    description: Production
security: []
paths:
  /v1/knowledge/item/url:
    post:
      tags:
        - Knowledge Items
      summary: Upload Url Items
      description: |-
        Index web URLs as knowledge items.
        Each URL is crawled, parsed, and indexed asynchronously.
      operationId: upload_url_items_v1_knowledge_item_url_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/URLKnowledgeItemRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/URLUploadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    URLKnowledgeItemRequest:
      properties:
        items:
          items:
            $ref: '#/components/schemas/URLKnowledgeItem'
          type: array
          title: URL Items
          description: List of URLs to crawl and index as knowledge items
        knowledge_base_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Knowledge Base ID
          description: Optional ID of a knowledge base to assign all items to
      type: object
      required:
        - items
      title: URLKnowledgeItemRequest
    URLUploadResponse:
      properties:
        successful_items:
          items:
            $ref: '#/components/schemas/URLKnowledgeItemResponse'
          type: array
          title: Successful Items
          description: List of URL knowledge items that were successfully processed
        failed_items:
          items:
            $ref: '#/components/schemas/FailedKnowledgeItem'
          type: array
          title: Failed Items
          description: List of knowledge items that failed to process
      type: object
      required:
        - successful_items
        - failed_items
      title: URLUploadResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    URLKnowledgeItem:
      properties:
        url:
          type: string
          title: URL
          description: URL to crawl and index
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Item Name
          description: Name for the knowledge item. Defaults to the URL if not provided.
      type: object
      required:
        - url
      title: URLKnowledgeItem
    URLKnowledgeItemResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Knowledge Item ID
          description: Unique identifier for the knowledge item
        name:
          type: string
          title: Knowledge Item Name
          description: Name of the knowledge item
        created_date:
          type: string
          format: date-time
          title: Created Date
          description: When the item was created
        category:
          type: string
          const: url
          title: Category
          default: url
        status:
          $ref: '#/components/schemas/KnowledgeItemStatus'
          title: Item Status
          description: Current status of the knowledge item
        size_bytes:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size Bytes
          description: Size of the knowledge item content in bytes
        knowledge_base_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Knowledge Base ID
          description: ID of the knowledge base this item belongs to, if any
        url:
          type: string
          title: Item Url
          description: URL of the indexed web page
      type: object
      required:
        - id
        - name
        - created_date
        - status
        - url
      title: URLKnowledgeItemResponse
    FailedKnowledgeItem:
      properties:
        name:
          type: string
          title: Item Name
          description: Name of the failed knowledge item
        error:
          type: string
          title: Error Message
          description: Description of why the item failed to process
      type: object
      required:
        - name
        - error
      title: FailedKnowledgeItem
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    KnowledgeItemStatus:
      type: string
      enum:
        - indexing
        - uploaded
        - error
      title: KnowledgeItemStatus
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````