Wissensdatenbank erstellen
curl --request POST \
--url https://app.famulor.de/api/user/knowledgebases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://app.famulor.de/api/user/knowledgebases', 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"
payload = { "name": "<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",
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>'
]),
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"
payload := strings.NewReader("{\n \"name\": \"<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": "Knowledgebase created successfully.",
"data": {
"id": 1,
"name": "Produktdokumentation",
"description": "Technische Dokumentation für unsere Produkte",
"status": "empty",
"status_label": "Leer",
"created_at": "2025-01-08T10:30:00.000000Z",
"updated_at": "2025-01-08T10:30:00.000000Z"
}
}
{
"message": "The name field is required.",
"errors": {
"name": [
"The name field is required."
]
}
}
{
"error": "Failed to create knowledgebase. Please try again."
}
Wissensdatenbank erstellen
Erstelle eine neue Wissensdatenbank in Famulor per API, um KI-Telefonassistenten mit Unternehmensinfos, FAQs, Produktdaten und Referenzdokumenten zu versorgen.
POST
/
api
/
user
/
knowledgebases
Wissensdatenbank erstellen
curl --request POST \
--url https://app.famulor.de/api/user/knowledgebases \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>'})
};
fetch('https://app.famulor.de/api/user/knowledgebases', 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"
payload = { "name": "<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",
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>'
]),
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"
payload := strings.NewReader("{\n \"name\": \"<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": "Knowledgebase created successfully.",
"data": {
"id": 1,
"name": "Produktdokumentation",
"description": "Technische Dokumentation für unsere Produkte",
"status": "empty",
"status_label": "Leer",
"created_at": "2025-01-08T10:30:00.000000Z",
"updated_at": "2025-01-08T10:30:00.000000Z"
}
}
{
"message": "The name field is required.",
"errors": {
"name": [
"The name field is required."
]
}
}
{
"error": "Failed to create knowledgebase. Please try again."
}
Dieser Endpunkt erstellt eine neue Wissensdatenbank. Nach der Erstellung kannst du Dokumente hinzufügen, indem du den Dokument erstellen Endpunkt verwendest.
Request Body
string
erforderlich
Der Name der Wissensdatenbank (max. 255 Zeichen)
string
Optionale Beschreibung der Wissensdatenbank (max. 255 Zeichen)
Antwort-Felder
string
Erfolgsmeldung
object
Das erstellte Wissensdatenbank-Objekt
Anzeigen Daten-Eigenschaften
Anzeigen Daten-Eigenschaften
integer
Die eindeutige Kennung der Wissensdatenbank
string
Der Name der Wissensdatenbank
string
Beschreibung der Wissensdatenbank
string
Aktueller Status (wird
empty für neue Wissensdatenbanken sein)string
Menschenlesbares Status-Label
string
ISO 8601 Zeitstempel der Erstellung
string
ISO 8601 Zeitstempel der letzten Aktualisierung
Nächste Schritte
Nach der Erstellung einer Wissensdatenbank solltest du:- Dokumente hinzufügen - Verwende den Dokument erstellen Endpunkt, um Inhalte hinzuzufügen
- Auf Verarbeitung warten - Dokumente werden asynchron verarbeitet
- An Assistenten anhängen - Verwende den Assistent aktualisieren Endpunkt, um die Wissensdatenbank anzuhängen
{
"message": "Knowledgebase created successfully.",
"data": {
"id": 1,
"name": "Produktdokumentation",
"description": "Technische Dokumentation für unsere Produkte",
"status": "empty",
"status_label": "Leer",
"created_at": "2025-01-08T10:30:00.000000Z",
"updated_at": "2025-01-08T10:30:00.000000Z"
}
}
{
"message": "The name field is required.",
"errors": {
"name": [
"The name field is required."
]
}
}
{
"error": "Failed to create knowledgebase. Please try again."
}
⌘I