Crear documento
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 conocimiento
Crear documento
Sube un nuevo documento a una base de conocimiento de Famulor mediante la API. Añade PDFs, texto, preguntas frecuentes o datos de producto que los asistentes de voz de IA puedan consultar durante las llamadas.
POST
/
api
/
user
/
knowledgebases
/
{knowledgebaseId}
/
documents
Crear documento
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 de Famulor 1.0 (legado). Esta página se aplica únicamente a Famulor 1.0 (
app.famulor.de) y se conserva por compatibilidad. Para la plataforma actual, usa la referencia de la API de Famulor 2.0.Parámetros de ruta
integer
requerido
El identificador único de la base de conocimiento
Cuerpo de la solicitud
string
requerido
El nombre del documento (máx. 255 caracteres)
string
Descripción opcional del documento (máx. 255 caracteres)
string
requerido
Tipo de documento:
website, pdf, txt o docxDocumentos de sitio web
string
La URL principal a rastrear. Obligatoria si no se proporciona
links.array
Array de URLs específicas a rastrear. Obligatorio si no se proporciona
url.Mostrar Propiedades de los enlaces
Mostrar Propiedades de los enlaces
string
requerido
Una URL válida para incluir en el documento
integer
predeterminado:"10"
Número máximo de enlaces relativos a seguir durante el rastreo (1-50)
Documentos de archivo (PDF, TXT, DOCX)
file
requerido
El archivo a subir (máx. 20 MB). Usa la codificación
multipart/form-data.Campos de respuesta
string
Mensaje de éxito
object
El objeto del documento creado
Mostrar Propiedades de los datos
Mostrar Propiedades de los datos
integer
El identificador único del documento
string
El nombre del documento
string
Descripción del documento
string
Tipo de documento
string
Etiqueta de tipo legible para humanos
string
Estado de procesamiento (inicialmente será
processing)string
Etiqueta de estado legible para humanos
string
Marca de tiempo ISO 8601 de creación
Tipos de documento
| Tipo | Descripción | Entrada |
|---|---|---|
website | Rastrea sitios web y extrae el contenido de texto | URL o lista de URLs |
pdf | Extrae texto de archivos PDF | Carga de archivo PDF |
txt | Contenido de texto sin formato | Carga de archivo TXT |
docx | Extrae texto de documentos de Word | Carga de archivo DOCX |
El procesamiento de documentos es asíncrono. Llama al endpoint Obtener documento para comprobar cuándo finaliza el procesamiento.
{
"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."
}