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

# Copy Filesystem to Knowledge Base

> Copy a file or directory tree from a connector filesystem root into a knowledge base's document store. Store-only by default (parse: true to opt in). Requires fs:copy (0.1.27+).



## OpenAPI

````yaml POST /orgs/{org_id}/connectors/{connector_id}/filesystems/copy
openapi: 3.1.0
info:
  title: Timbal Platform API
  description: Public API documentation for the Timbal platform
  license:
    name: ''
  version: 2.0.0
servers:
  - url: https://api.timbal.ai
    description: Production
  - url: https://api.dev.timbal.ai
    description: Development
security: []
tags:
  - name: ace
    description: Action Control Engine (ACE) operations
  - name: analytics
    description: Org and project analytics
  - name: billing
    description: Subscriptions, usage, and payment-related operations
  - name: content
    description: Re-sign stored content URLs
  - name: files
    description: File operations
  - name: iam
    description: IAM — actions, roles, users, and authorization introspection
  - name: k2
    description: Knowledge Bases v2 operations
  - name: orgs
    description: Organization operations
  - name: projects
    description: Project operations
  - name: runs
    description: Execution operations
  - name: templates
    description: Public project template catalog
  - name: users
    description: Authenticated user profile
paths:
  /orgs/{org_id}/connectors/{connector_id}/filesystems/copy:
    post:
      tags:
        - connectors
      summary: '`POST /orgs/{org_id}/connectors/{connector_id}/filesystems/copy`'
      description: >-
        Copy a file or directory tree from a connector filesystem root into a
        knowledge base's document store. Store-only by default (parse: true to
        opt in). Requires fs:copy (0.1.27+).
      operationId: copy
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            type: string
        - name: connector_id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CopyReq'
        required: true
      responses:
        '202':
          description: Copy job accepted and dispatched
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CopyRes'
        '400':
          description: Invalid request
        '403':
          description: Forbidden
        '404':
          description: Connector or KB not found
        '422':
          description: Connector offline / too old
      security:
        - bearer_auth: []
components:
  schemas:
    CopyReq:
      type: object
      required:
        - filesystem_ref
        - kb_id
      properties:
        directory:
          type:
            - string
            - 'null'
          description: |-
            KB directory files land under (root when omitted). A recursive copy
            recreates the tree below it.
        filesystem_ref:
          type: string
          description: Filesystem root ref on the node (from `/browse/filesystems`).
        kb_id:
          type: integer
          format: int64
          description: Target KB (numeric id, same as the `/k2` routes).
        max_files:
          type:
            - integer
            - 'null'
          format: int32
          description: Job cap on files shipped. Omit for the node default (5000).
          minimum: 0
        max_total_bytes:
          type:
            - integer
            - 'null'
          format: int64
          description: Job cap on aggregate raw bytes. Omit for the node default (2 GiB).
          minimum: 0
        metadata:
          type: object
          description: Metadata stamped onto every landed file.
        parse:
          type: boolean
          description: >-
            Parse + embed after storing. Default `false` — copy is store-only;
            the

            KB's auto-processing setting never applies to connector copies.
        path:
          type: string
          description: |-
            Path relative to the root: a file, or a directory when `recursive`.
            Empty / omitted / whitespace = the filesystem root (same as the
            connector's `CopyFileJob` / browse verbs).
        recursive:
          type: boolean
          description: >-
            `true` = `path` is a directory: walk it and stream every regular
            file

            (symlinks skipped). Copying a directory without it is refused
            node-side.
    CopyRes:
      type: object
      required:
        - job_id
      properties:
        job_id:
          type: string
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: >-
        Timbal API key. Obtain your API key from the Timbal platform settings.
        See [Authentication](/api-reference/authentication) for more
        information.

````