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

# Refresh Knowledge Item

> Re-crawl a URL knowledge item so its indexed content matches the live page.
Returns the item with status `indexing`; poll the item until it is `uploaded`
(or `error`). `updated_date` is set once the refresh succeeds.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/knowledge/item/{id}/refresh
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/{id}/refresh:
    post:
      tags:
        - Knowledge Items
      summary: Refresh Knowledge Item
      description: >-
        Re-crawl a URL knowledge item so its indexed content matches the live
        page.

        Returns the item with status `indexing`; poll the item until it is
        `uploaded`

        (or `error`). `updated_date` is set once the refresh succeeds.
      operationId: refresh_knowledge_item_v1_knowledge_item__id__refresh_post
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/FileKnowledgeItemResponse'
                  - $ref: '#/components/schemas/URLKnowledgeItemResponse'
                  - $ref: '#/components/schemas/TextKnowledgeItemResponse'
                discriminator:
                  propertyName: category
                  mapping:
                    file: '#/components/schemas/FileKnowledgeItemResponse'
                    url: '#/components/schemas/URLKnowledgeItemResponse'
                    txt: '#/components/schemas/TextKnowledgeItemResponse'
                title: >-
                  Response Refresh Knowledge Item V1 Knowledge Item  Id  Refresh
                  Post
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - CustomHTTPBearer: []
components:
  schemas:
    FileKnowledgeItemResponse:
      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
        updated_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated Date
          description: When the item content was last refreshed from its source, if ever
        category:
          type: string
          const: file
          title: Category
          default: file
        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 where the file is stored
      type: object
      required:
        - id
        - name
        - created_date
        - status
        - url
      title: FileKnowledgeItemResponse
    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
        updated_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated Date
          description: When the item content was last refreshed from its source, if ever
        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
    TextKnowledgeItemResponse:
      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
        updated_date:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated Date
          description: When the item content was last refreshed from its source, if ever
        category:
          type: string
          const: txt
          title: Category
          default: txt
        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
        content:
          anyOf:
            - type: string
            - type: 'null'
          title: Content
          description: Text content of the knowledge item
      type: object
      required:
        - id
        - name
        - created_date
        - status
      title: TextKnowledgeItemResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    KnowledgeItemStatus:
      type: string
      enum:
        - indexing
        - uploaded
        - error
      title: KnowledgeItemStatus
    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
  securitySchemes:
    CustomHTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.