Skip to main content
POST
https://app.famulor.de/api/
/
conversations
{
  "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?"
    }
  ]
}
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

assistant_id
string
required
UUID des Assistenten, der die Conversation übernehmen soll
type
string
default:"widget"
Conversation-Typ. Optionen: widget (kostenpflichtig) oder test (kostenlos für Entwicklung)
variables
object
Individuelle Variablen, die in den Assistenten-Kontext injiziert werden (zugreifbar via {{variable_name}})

Request Examples

cURL
curl -X POST "https://app.famulor.de/api/conversations" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "assistant_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "widget",
    "variables": {
      "customer_name": "John Smith",
      "company": "Acme Corp",
      "source": "pricing_page"
    }
  }'
JavaScript
const response = await fetch("https://app.famulor.de/api/conversations", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: "Bearer YOUR_API_KEY",
  },
  body: JSON.stringify({
    assistant_id: "550e8400-e29b-41d4-a716-446655440000",
    type: "widget",
    variables: {
      customer_name: "John Smith",
      company: "Acme Corp",
      source: "pricing_page",
    },
  }),
});

const data = await response.json();
Python
import requests

payload = {
    "assistant_id": "550e8400-e29b-41d4-a716-446655440000",
    "type": "widget",
    "variables": {
        "customer_name": "John Smith",
        "company": "Acme Corp",
        "source": "pricing_page",
    },
}

response = requests.post(
    "https://app.famulor.de/api/conversations",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_API_KEY",
    },
    json=payload,
    timeout=10,
)

print(response.json())

Response Fields

status
boolean
required
Zeigt an, ob die Anfrage erfolgreich war
conversation_id
string
required
UUID der erstellten Conversation; für weitere Nachrichten nutzen
history
array
Initialer Conversation-Verlauf. Leer, falls der Assistent keine Startnachricht hat.

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?"
    }
  ]
}

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 Message fort und hole den Verlauf mit Get Conversation.