---
title: "Upload a PDF file to a knowledge base"
method: POST
path: "/knowledgebase/{id}/items/upload-media"
tags: ["Knowledge Base"]
---

# Upload a PDF file to a knowledge base

`POST /knowledgebase/{id}/items/upload-media`

Upload a PDF file to a knowledge base. Only PDF files are accepted (validated by MIME type and extension).

**400 is returned for billing/entitlement failures before the file is processed:**
- `"Insufficient credits for KB storage upload."` — account lacks upload credits
- `"KB storage access is not enabled for your account."` — plan doesn't include KB storage

No application-level file size limit is enforced — any proxy or infrastructure limits (e.g. nginx) apply instead.

## Path parameters

- `id` string, required

## Response `201`

Knowledge base item created successfully

- object
  - `status` boolean

## Other responses

- `400` — Invalid input
- `401` — Unauthorized access
- `500` — Internal server error

---

[API](https://skmtc.net/smallest-inc/apis/agent-management-api.md) · [All operations](https://skmtc.net/smallest-inc/apis/agent-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/smallest-inc/agent-management-api/versions/6d1036a76fbc/schema)
