---
title: "Submit Knowledge File"
method: POST
path: "/v1/knowledge-files/{id}/submit"
tags: ["Agent Knowledge Files"]
---

# Submit Knowledge File

`POST /v1/knowledge-files/{id}/submit`

## Request

- Base URL: `https://api.bey.dev`
- URL: `https://api.bey.dev/v1/knowledge-files/{id}/submit`
- Auth: API key in header `x-api-key`

Finalize a chunked knowledge file upload.

Assembles the uploaded chunks and starts extracting and indexing them.
Returns the file as `processing`; it becomes `available` once that
finishes, which takes minutes for a long document.

## Path parameters

- `id` string, required: Knowledge File ID.

## Response `200`

Processed Knowledge File

- union
  - ToUploadKnowledgeFileResponse: Response model for a knowledge file that is to be uploaded.
    - `id` string, required: Unique identifier of the object in the database.
    - `name` string, required
    - `format` 'text' | 'pdf', required: Format of the knowledge file.
    - `status` 'to-upload'
  - ProcessingKnowledgeFileResponse: Response model for a knowledge file that is still being processed.
    - `id` string, required: Unique identifier of the object in the database.
    - `name` string, required
    - `format` 'text' | 'pdf', required: Format of the knowledge file.
    - `status` 'processing'
  - AvailableKnowledgeFileResponse: Response model for an available knowledge file.
    - `id` string, required: Unique identifier of the object in the database.
    - `name` string, required
    - `format` 'text' | 'pdf', required: Format of the knowledge file.
    - `status` 'available'
    - `text` string, required: Text extracted from the file. Shortened to the start of the file when it is a large one; see `is_text_complete`.
    - `is_text_complete` boolean, required: Whether `text` is the whole file rather than the start of it. A large file is stored and searched in full either way; this only says how much of it this endpoint hands back.
  - FailedKnowledgeFileResponse: Response model for a knowledge file that could not be processed.
    - `id` string, required: Unique identifier of the object in the database.
    - `name` string, required
    - `format` 'text' | 'pdf', required: Format of the knowledge file.
    - `status` 'failed'
    - `reason` string, required

## Other responses

- `401`: Authentication failed. The `x-api-key` header is missing or the provided API key is invalid.
- `402`: The plan's usage limit has been reached, or the requested feature requires a plan upgrade.
- `403`: The API key is valid but not permitted to perform this action, because the resource belongs to someone else.
- `404`: The requested resource does not exist or is not accessible with this API key.
- `422`: The request is malformed. `detail` lists each field that failed validation, where it was located, and why.
- `429`: The plan's limit on the number of concurrent sessions has been reached.

## Changes

- **2026-10-20** `0469e200c235`: 1 info
  - added the non-success response with the status `402`
- **2026-10-16** `c8f80740b51c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/bey-dev/apis/beyond-presence-api/changes/v1/knowledge-files/:id/submit/post.md)

---

[API](https://skmtc.dev/bey-dev/apis/beyond-presence-api.md) - [All operations](https://skmtc.dev/bey-dev/apis/beyond-presence-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bey-dev/apis/beyond-presence-api/revisions/2d37d86bc5c1?raw)
