Create Document
curl --request POST \
--url https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', type: '<string>'})
};
fetch('https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents"
payload = {
"name": "<string>",
"type": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "Document created successfully. Processing will begin shortly.",
"data": {
"id": 1,
"name": "Company Website",
"description": "Main website content",
"type": "website",
"type_label": "Website",
"status": "processing",
"status_label": "Processing",
"created_at": "2025-01-08T10:30:00.000000Z"
}
}
{
"message": "Document created successfully. Processing will begin shortly.",
"data": {
"id": 2,
"name": "Product Handbook",
"description": "User manual for our product",
"type": "pdf",
"type_label": "PDF",
"status": "processing",
"status_label": "Processing",
"created_at": "2025-01-08T10:35:00.000000Z"
}
}
{
"error": "Knowledgebase not found."
}
{
"message": "A file is required for this document type.",
"errors": {
"file": [
"A file is required for this document type."
]
}
}
{
"error": "Failed to create document. Please try again."
}
Create Document
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.
POST
/
api
/
user
/
knowledgebases
/
{knowledgebaseId}
/
documents
Create Document
curl --request POST \
--url https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', type: '<string>'})
};
fetch('https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents"
payload = {
"name": "<string>",
"type": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'type' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"type\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"message": "Document created successfully. Processing will begin shortly.",
"data": {
"id": 1,
"name": "Company Website",
"description": "Main website content",
"type": "website",
"type_label": "Website",
"status": "processing",
"status_label": "Processing",
"created_at": "2025-01-08T10:30:00.000000Z"
}
}
{
"message": "Document created successfully. Processing will begin shortly.",
"data": {
"id": 2,
"name": "Product Handbook",
"description": "User manual for our product",
"type": "pdf",
"type_label": "PDF",
"status": "processing",
"status_label": "Processing",
"created_at": "2025-01-08T10:35:00.000000Z"
}
}
{
"error": "Knowledgebase not found."
}
{
"message": "A file is required for this document type.",
"errors": {
"file": [
"A file is required for this document type."
]
}
}
{
"error": "Failed to create document. Please try again."
}
This endpoint creates a new document in a knowledge base. Documents are processed asynchronously - the endpoint returns immediately while processing continues in the background.
Path Parameters
integer
required
The unique identifier of the knowledge base
Request Body
string
required
The name of the document (max. 255 characters)
string
Optional description of the document (max. 255 characters)
string
required
Document type:
website, pdf, txt or docxWebsite Documents
string
The main URL to scrape. Required if
links is not provided.array
Array of specific URLs to scrape. Required if
url is not provided.Show Links Properties
Show Links Properties
string
required
A valid URL to include in the document
integer
default:"10"
Maximum number of relative links to follow when scraping (1-50)
File Documents (PDF, TXT, DOCX)
file
required
The file to upload (max. 20MB). Use
multipart/form-data encoding.Response Fields
string
Success message
object
The created document object
Show Data Properties
Show Data Properties
Document Types
| Type | Description | Input |
|---|---|---|
website | Scrapes websites and extracts text content | URL or list of URLs |
pdf | Extracts text from PDF files | PDF file upload |
txt | Plain text content | TXT file upload |
docx | Extracts text from Word documents | DOCX file upload |
Document processing is asynchronous. Call the Get Document endpoint to check when processing is complete.
{
"message": "Document created successfully. Processing will begin shortly.",
"data": {
"id": 1,
"name": "Company Website",
"description": "Main website content",
"type": "website",
"type_label": "Website",
"status": "processing",
"status_label": "Processing",
"created_at": "2025-01-08T10:30:00.000000Z"
}
}
{
"message": "Document created successfully. Processing will begin shortly.",
"data": {
"id": 2,
"name": "Product Handbook",
"description": "User manual for our product",
"type": "pdf",
"type_label": "PDF",
"status": "processing",
"status_label": "Processing",
"created_at": "2025-01-08T10:35:00.000000Z"
}
}
{
"error": "Knowledgebase not found."
}
{
"message": "A file is required for this document type.",
"errors": {
"file": [
"A file is required for this document type."
]
}
}
{
"error": "Failed to create document. Please try again."
}
Was this page helpful?
⌘I

