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

# Lưu trữ tài liệu tri thức

> Chuyển tài liệu đang hoạt động sang trạng thái lưu trữ.

Đây là lưu trữ, không xóa vật lý. Các lần tìm tài liệu sau chỉ chọn tài liệu `ready`; tài liệu chuyển `archived` không được chọn nữa. Xem [Kho tri thức](https://docs.taho.com.vn/ai/index.md#kho-tri-thức).


## OpenAPI

````yaml openapi.json DELETE /admin/ai/knowledge
openapi: 3.0.3
info:
  title: 'Taho: Mini App và AI'
  version: source-review-2026-10-07
  description: >-
    Đặc tả biên soạn trong docs từ handler và service hiện tại. Không phải
    endpoint Swagger do application phục vụ; không xác nhận kết nối provider
    hoặc UAT.
servers: []
security: []
tags:
  - name: Mini App
  - name: Admin Mini App
  - name: AI
paths:
  /admin/ai/knowledge:
    delete:
      tags:
        - AI
      summary: Lưu trữ tài liệu AI
      description: >-
        Cần cùng quyền quản lý tri thức và same-origin. Chuyển tài liệu ready
        sang archived, không xóa vật lý. Ghi audit cùng transaction. Body tối đa
        4.096 byte.
      operationId: archiveAiKnowledge
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                documentId:
                  type: integer
                  minimum: 1
              required:
                - documentId
              additionalProperties: true
      responses:
        '200':
          description: ID tài liệu và trạng thái archived.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      documentId:
                        type: integer
                      status:
                        type: string
                        enum:
                          - archived
                    required:
                      - documentId
                      - status
                    additionalProperties: true
                required:
                  - success
                  - data
                additionalProperties: true
        '400':
          description: invalid-knowledge khi tài liệu hoặc trạng thái không hợp lệ.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: forbidden-origin hoặc forbidden.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: request-too-large.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: knowledge-unavailable, gồm lỗi JSON ngoài nhóm nhận diện.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - AdminBearer: []
        - AdminCookie: []
components:
  schemas:
    Error:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details: {}
          required:
            - code
            - message
          additionalProperties: true
      required:
        - success
        - error
      additionalProperties: true
  securitySchemes:
    AdminBearer:
      type: http
      scheme: bearer
      description: Token phiên quản trị, vẫn phải qua route/action và active tower checks.
    AdminCookie:
      type: apiKey
      in: cookie
      name: taho_jwt

````

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