---
title: "Upload Knowledge File"
method: POST
path: "/agents/{agent_id}/knowledge-files"
tags: ["agents"]
---

# Upload Knowledge File

`POST /agents/{agent_id}/knowledge-files`

## Request

- Base URL: `https://studio-api.meganova.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://studio-api.meganova.ai/agents/{agent_id}/knowledge-files`
- Auth: OAuth 2
  - Password
  - Token URL: `auth/token`

Upload a knowledge file for an agent. Supports PDF, TXT, MD, DOCX, CSV.

## Path parameters

- `agent_id` string, uuid, required

## Request body `multipart/form-data`

- BodyUploadKnowledgeFileAgentsAgentIdKnowledgeFilesPost
  - `file` string, binary, required

## Response `201`

Successful Response

- AgentKnowledgeFileResponse: Response for an agent knowledge file.
  - `id` string, uuid, required
  - `agent_id` string, uuid, required
  - `filename` string, required
  - `mime_type` string, nullable
  - `file_size` integer
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

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