---
title: "Create Document"
method: POST
path: "/user/knowledgebases/{knowledgebaseId}/documents"
tags: ["Knowledge Bases"]
---

# Create Document

`POST /user/knowledgebases/{knowledgebaseId}/documents`

## Request

- Base URL: `https://app.famulor.de/api`
- URL: `https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents`
- Auth: HTTP bearer

Upload a new document to a Famulor knowledge base via API. Add PDFs, text, FAQs or product data that AI voice assistants can reference during calls.

[Docs](https://docs.famulor.io/api-v1/knowledgebases/create-document)

## Path parameters

- `knowledgebaseId` integer, required

## Request body

- object
  - `name` string, required: The name of the document (max. 255 characters)
  - `description` string: Optional description of the document (max. 255 characters)
  - `type` string, required: Document type: `website`, `pdf`, `txt` or `docx`
  - `url` string: The main URL to scrape. Required if `links` is not provided.
  - `links` object[]: Array of specific URLs to scrape. Required if `url` is not provided.
    - `link` string, required: A valid URL to include in the document
  - `relative_links_limit` integer: Maximum number of relative links to follow when scraping (1-50)
  - `file` string, binary, required: The file to upload (max. 20MB). Use `multipart/form-data` encoding.

## Response `201`

Created

- object
  - `message` string: Success message
  - `data` object: The created document object
    - `id` integer: The unique identifier of the document
    - `name` string: The name of the document
    - `description` string: Description of the document
    - `type` string: Document type
    - `type_label` string: Human-readable type label
    - `status` string: Processing status (will initially be `processing`)
    - `status_label` string: Human-readable status label
    - `created_at` string: ISO 8601 timestamp of creation

## Other responses

- `401`: Fehlender oder ungültiger API-Key.
- `404`: Knowledgebase Not Found
- `422`: Validation Error
- `500`: Processing Error

---

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