---
title: "Copy one collection document's original file into a connected project's store"
method: POST
path: "/api/v0/desk/projects/{project_id}/knowledge-base-file"
tags: ["Desk"]
---

# Copy one collection document's original file into a connected project's store

`POST /api/v0/desk/projects/{project_id}/knowledge-base-file`

## Request

- Base URL: `https://api.outerport.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outerport.com/api/v0/desk/projects/{project_id}/knowledge-base-file`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/outerport/apis/outerport-api/docs/api/v0/desk/projects/:project_id/knowledge-base-file/post.ts> (a function with typed inputs; its response is checked against the schema)

Stores the document's original file in the project owner's store and answers the entry to commit at ``path``. Nothing is committed: ``/knowledge-base/commit`` commits every file copied, in one write. The document must belong to the project's collection, and, while the project is shared, to the organization it is shared with.

## Path parameters

- `project_id` string, uuid, required

## Request body

- KnowledgeBaseFileCopyRequest
  - `document_id` string, uuid, required
  - `path` string, required

## Response `200`

Successful Response

- KnowledgeBaseFileCopy: A document's file, stored in the project owner's store and not yet committed. ``taken_revision`` is the document's ``file_revision`` when its file was read, which the commit records.
  - `path` string, required
  - `sha256` string, required
  - `size` integer, required
  - `document_id` string, uuid, required
  - `taken_revision` integer, required

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-26** `07854361a13b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outerport/apis/outerport-api/changes/api/v0/desk/projects/:project_id/knowledge-base-file/post.md)

---

[API](https://skmtc.dev/outerport/apis/outerport-api.md) - [All operations](https://skmtc.dev/outerport/apis/outerport-api/llms.txt) - [OpenAPI document](https://skmtc.dev/outerport/apis/outerport-api/revisions/08b5bf6f7f18?raw)
