Conversation erstellen
curl --request POST \
--url https://app.famulor.de/api/conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assistant_id": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({assistant_id: '<string>'})
};
fetch('https://app.famulor.de/api/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.famulor.de/api/conversations"
payload = { "assistant_id": "<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/conversations",
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([
'assistant_id' => '<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/conversations"
payload := strings.NewReader("{\n \"assistant_id\": \"<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))
}{
"status": true,
"conversation_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"history": [
{
"role": "assistant",
"content": "Hello John Smith! Welcome to Acme Corp support. How can I help you today?"
}
]
}
{
"status": true,
"conversation_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"history": []
}
{
"status": false,
"error": "Assistant not found"
}
{
"status": false,
"error": "Insufficient balance. Please top up your account."
}
Conversation erstellen
Neue Chat-Session mit einem KI-Assistenten starten
POST
/
conversations
Conversation erstellen
curl --request POST \
--url https://app.famulor.de/api/conversations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"assistant_id": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({assistant_id: '<string>'})
};
fetch('https://app.famulor.de/api/conversations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.famulor.de/api/conversations"
payload = { "assistant_id": "<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/conversations",
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([
'assistant_id' => '<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/conversations"
payload := strings.NewReader("{\n \"assistant_id\": \"<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))
}{
"status": true,
"conversation_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"history": [
{
"role": "assistant",
"content": "Hello John Smith! Welcome to Acme Corp support. How can I help you today?"
}
]
}
{
"status": true,
"conversation_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"history": []
}
{
"status": false,
"error": "Assistant not found"
}
{
"status": false,
"error": "Insufficient balance. Please top up your account."
}
Erstelle eine neue Conversation mit deinem Famulor KI-Assistenten. Über diesen Endpoint startest du eine Widget- oder Test-Conversation und erhältst den initialen Verlauf.
Request Body
string
erforderlich
UUID des Assistenten, der die Conversation übernehmen soll
string
Standard:"widget"
Conversation-Typ. Optionen:
widget (kostenpflichtig) oder test (kostenlos für Entwicklung)object
Request Examples
Response Fields
boolean
erforderlich
Zeigt an, ob die Anfrage erfolgreich war
string
erforderlich
UUID der erstellten Conversation; für weitere Nachrichten nutzen
array
Response Examples
{
"status": true,
"conversation_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"history": [
{
"role": "assistant",
"content": "Hello John Smith! Welcome to Acme Corp support. How can I help you today?"
}
]
}
{
"status": true,
"conversation_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
"history": []
}
{
"status": false,
"error": "Assistant not found"
}
{
"status": false,
"error": "Insufficient balance. Please top up your account."
}
Notes
type: "widget"Conversations sind kostenpflichtig;type: "test"ist kostenlos für die Entwicklung.- Nutze aussagekräftige
variables, um die erste Antwort des Assistenten zu personalisieren. - Fahre mit
Send Messagefort und hole den Verlauf mitGet Conversation.