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

# Move an asset into or out of a sharing folder

> Use sourceId from list_knowledge_sources assetsOnly=true and folderId from list_knowledge_asset_folders, or null to remove the asset from its folder. Folder scope/activation affect attachment eligibility. Read the returned asset and folder afterward. Required permission: knowledge:write. Connected business only; no tenant override.



## OpenAPI

````yaml /openapi.json patch /knowledge/sources/{sourceId}/folder
openapi: 3.0.3
info:
  title: Visito M2M API
  version: 1.0.0
  description: >-
    Tenant-scoped server-to-server API for channels, conversations, commerce,
    custom AI tools, and WhatsApp templates. Send operations are asynchronous
    and return queued acknowledgements. Expansion adds conversation controls,
    knowledge, sales opportunities, delivery status, reporting, and signed
    webhooks.
servers:
  - url: https://platform-api.visitoai.com/m2m/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Channels
  - name: Conversations
  - name: Commerce
  - name: Custom tools
  - name: WhatsApp templates
  - name: Properties
  - name: Knowledge
  - name: Sales CRM
  - name: Delivery
  - name: Reporting
  - name: Webhooks
paths:
  /knowledge/sources/{sourceId}/folder:
    patch:
      summary: Move an asset into or out of a sharing folder
      description: >-
        Use sourceId from list_knowledge_sources assetsOnly=true and folderId
        from list_knowledge_asset_folders, or null to remove the asset from its
        folder. Folder scope/activation affect attachment eligibility. Read the
        returned asset and folder afterward. Required permission:
        knowledge:write. Connected business only; no tenant override.
      operationId: set_knowledge_asset_folder
      parameters:
        - name: sourceId
          in: path
          required: true
          description: >-
            Copy sourceId from list_knowledge_sources with assetsOnly=true; it
            belongs to the connected business. Do not derive it from a title,
            URL or external provider ID.
          schema:
            type: string
            maxLength: 128
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KnowledgeAssetFolderMoveInput'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KnowledgeAssetResult'
        '400':
          description: Invalid request
        '403':
          description: Missing permission
        '404':
          description: Resource not found
        '409':
          description: Conflict; read state and reconcile
components:
  schemas:
    KnowledgeAssetFolderMoveInput:
      type: object
      additionalProperties: false
      properties:
        folderId:
          type: string
          maxLength: 128
          nullable: true
      required:
        - folderId
    KnowledgeAssetResult:
      type: object
      additionalProperties: false
      properties:
        asset:
          $ref: '#/components/schemas/KnowledgeAsset'
      required:
        - asset
    KnowledgeAsset:
      type: object
      additionalProperties: false
      properties:
        sourceId:
          type: string
          maxLength: 128
        title:
          type: string
          maxLength: 160
        description:
          type: string
          maxLength: 600
        mediaType:
          type: string
          enum:
            - image
            - document
        contentType:
          type: string
          maxLength: 128
        filename:
          type: string
          maxLength: 255
        sizeBytes:
          type: integer
          minimum: 0
        active:
          type: boolean
        validationStatus:
          type: string
          enum:
            - unsupported
            - pending
            - ready
            - blocked
            - failed
        validationFindings:
          type: array
          items:
            type: string
            maxLength: 2000
        propertyId:
          type: string
          maxLength: 128
        propertyName:
          type: string
          maxLength: 160
        folderId:
          type: string
          maxLength: 128
      required:
        - sourceId
        - title
        - contentType
        - filename
        - sizeBytes
        - active
        - validationStatus
        - validationFindings
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Visito M2M API key
      description: Server-side tenant-scoped credential created from Build > API Keys.

````

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