Créer un document
curl --request POST \
--url https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"type": "<string>",
"url": "<string>",
"links": [
{
"link": "<string>"
}
],
"relative_links_limit": 123
}
'import requests
url = "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents"
payload = {
"name": "<string>",
"description": "<string>",
"type": "<string>",
"url": "<string>",
"links": [{ "link": "<string>" }],
"relative_links_limit": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
type: '<string>',
url: '<string>',
links: [{link: '<string>'}],
relative_links_limit: 123
})
};
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));<?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>',
'description' => '<string>',
'type' => '<string>',
'url' => '<string>',
'links' => [
[
'link' => '<string>'
]
],
'relative_links_limit' => 123
]),
CURLOPT_HTTPHEADER => [
"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 \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"links\": [\n {\n \"link\": \"<string>\"\n }\n ],\n \"relative_links_limit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"links\": [\n {\n \"link\": \"<string>\"\n }\n ],\n \"relative_links_limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"links\": [\n {\n \"link\": \"<string>\"\n }\n ],\n \"relative_links_limit\": 123\n}"
response = http.request(request)
puts response.read_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."
}
Bases de connaissances
Créer un document
Téléversez un nouveau document dans une base de connaissances Famulor via l’API. Ajoutez des PDF, du texte, des FAQ ou des données produit que les assistants vocaux IA peuvent consulter pendant les appels.
POST
/
api
/
user
/
knowledgebases
/
{knowledgebaseId}
/
documents
Créer un document
curl --request POST \
--url https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"type": "<string>",
"url": "<string>",
"links": [
{
"link": "<string>"
}
],
"relative_links_limit": 123
}
'import requests
url = "https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents"
payload = {
"name": "<string>",
"description": "<string>",
"type": "<string>",
"url": "<string>",
"links": [{ "link": "<string>" }],
"relative_links_limit": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
type: '<string>',
url: '<string>',
links: [{link: '<string>'}],
relative_links_limit: 123
})
};
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));<?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>',
'description' => '<string>',
'type' => '<string>',
'url' => '<string>',
'links' => [
[
'link' => '<string>'
]
],
'relative_links_limit' => 123
]),
CURLOPT_HTTPHEADER => [
"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 \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"links\": [\n {\n \"link\": \"<string>\"\n }\n ],\n \"relative_links_limit\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
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))
}HttpResponse<String> response = Unirest.post("https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"links\": [\n {\n \"link\": \"<string>\"\n }\n ],\n \"relative_links_limit\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.famulor.de/api/user/knowledgebases/{knowledgebaseId}/documents")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"type\": \"<string>\",\n \"url\": \"<string>\",\n \"links\": [\n {\n \"link\": \"<string>\"\n }\n ],\n \"relative_links_limit\": 123\n}"
response = http.request(request)
puts response.read_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."
}
API Famulor 1.0 (héritée). Cette page concerne uniquement Famulor 1.0 (
app.famulor.de) et est conservée pour la compatibilité. Pour la plateforme actuelle, consultez la référence API Famulor 2.0.Paramètres de chemin
integer
requis
L’identifiant unique de la base de connaissances
Corps de la requête
string
requis
Le nom du document (255 caractères maximum)
string
Description facultative du document (255 caractères maximum)
string
requis
Type de document :
website, pdf, txt ou docxDocuments de site web
string
L’URL principale à explorer. Requis si
links n’est pas fourni.array
Tableau d’URL spécifiques à explorer. Requis si
url n’est pas fourni.Afficher Propriétés de links
Afficher Propriétés de links
string
requis
Une URL valide à inclure dans le document
integer
défaut:"10"
Nombre maximum de liens relatifs à suivre lors de l’exploration (1 à 50)
Documents fichiers (PDF, TXT, DOCX)
file
requis
Le fichier à téléverser (20 Mo maximum). Utilisez l’encodage
multipart/form-data.Champs de réponse
string
Message de succès
object
L’objet document créé
Afficher Propriétés de data
Afficher Propriétés de data
integer
L’identifiant unique du document
string
Le nom du document
string
Description du document
string
Type de document
string
Libellé de type lisible par un humain
string
Statut de traitement (sera initialement
processing)string
Libellé de statut lisible par un humain
string
Horodatage ISO 8601 de création
Types de documents
| Type | Description | Entrée |
|---|---|---|
website | Explore des sites web et en extrait le contenu textuel | URL ou liste d’URL |
pdf | Extrait le texte des fichiers PDF | Téléversement de fichier PDF |
txt | Contenu texte brut | Téléversement de fichier TXT |
docx | Extrait le texte des documents Word | Téléversement de fichier DOCX |
Le traitement des documents est asynchrone. Appelez le point de terminaison Récupérer un document pour vérifier si le traitement est terminé.
{
"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."
}