---
title: "Upload a knowledge file"
method: POST
path: "/knowledge/file"
tags: ["Knowledge"]
---

# Upload a knowledge file

`POST /knowledge/file`

## Request

- Base URL: `https://platform-api.visitoai.com/m2m/v1`
- URL: `https://platform-api.visitoai.com/m2m/v1/knowledge/file`
- Auth: HTTP bearer

Upload and ingest a host-provided supported file smaller than ten MiB. Use file.file_name or filename with its extension. assetUpload=true stores only a shareable asset, not answer knowledge; images are also asset-only under existing ingestion rules. Scan/extraction/readiness and knowledge/storage quotas are separate. There is no existing in-place file replacement; sourceId is unsupported. Read result active/quotaExceeded, then discover source/asset metadata and validation status. A local filesystem path is not a remote file URL. Required permission: knowledge:write.

## Request body `multipart/form-data`

- object
  - `file` string, binary, required: Maximum 10 MiB; existing supported document/image formats.
  - `title` string
  - `assetUpload` boolean

## Response `200`

Success

- KnowledgeIngestResponse
  - `sourceId` string
  - `chunks` integer
  - `created` boolean
  - `active` boolean
  - `quotaExceeded` boolean
  - `quota` object

## Other responses

- `201`: Success
- `default`: Structured error

---

[API](https://skmtc.dev/visitoai/apis/visito-m2m-api.md) - [All operations](https://skmtc.dev/visitoai/apis/visito-m2m-api/llms.txt) - [OpenAPI document](https://skmtc.dev/visitoai/apis/visito-m2m-api/revisions/98377d35c234?raw)
