API-Referenz, Webhooks und das einbettbare Widget für Bob — Ihr gesteuertes KI-Front-Office.
{
"email": "admin@office16852.com",
"password": "your_password"
}
{
"email": "customer@business.com",
"password": "customer_password"
}
Drei Wege: (1) Gleiche Herkunft, öffentlich, anonym → POST /api/chat (z. B. Widget auf Marketing-Website; kein Login). (2) Cross-Origin-Einbettung → POST /api/widget/chat with X-Widget-Key and allowed Origin. (3) Authentifizierte App / Mission Control → POST /api/chat/session und POST /api/chat/message (erfordert chat.manage and session/CSRF for cookie auth) — nicht for anonymous fetch von öffentlichen Seiten.
message, session_id, optional business_id.
X-Widget-Key, Content-Type: application/json. Origin must be allowed for the key. See docs/REQUEST_FLOWS.md im Repository zu CORS-Details.
chat.manage). Gibt zurück 401 if called anonymously from a public page — use POST /api/chat für diesen Fall stattdessen.
{
"session_id": "session_123",
"message": "Hello, I need help with my order"
}
Fügen Sie Bob mit einem einzigen Script-Tag zu jeder Website hinzu. Nach dem Onboarding ist Ihr Widget-Einbettungscode im Customer Portal unter verfügbar Widget-Einrichtung.
<!-- Canonical tenant-scoped bundle from Customer Portal Widget Setup (no API key in HTML). --> <script src="https://YOUR_OFFICE_HOST/widget/YOUR_TENANT_UUID/widget.js" async></script>
Personas bestimmen Ton, Namen und Anweisungen. Jeder Mandant bekommt ein Default-Persona, anpassbar in Admin oder per API.
{ name, description, tone, systemPrompt }Published pricebook is the source of truth. Use the APIs below for live numbers; this table matches pricebook-seed V1 (passt sich an, wenn Sie eine neue Version veröffentlichen).
| Funktion | Starter | Pro (Stufe) | Enterprise |
|---|---|---|---|
| Listenpreis (USD/Monat) | $79 | $249 | $899 |
| Enthaltene KI-Credits / Monat | 15,000 | 75,000 | 250,000 |
| Team-Plätze | Bis zu 3 | Bis zu 10 | Unbegrenzt |
| Standardintegrationen (enthalten) | 1 | 3 | 10 |
| Support | Priorität | Dediziert |
Verwenden Sie den Block, der zu Ihrem Szenario passt. Kopieren Sie das Admin-Beispiel nicht in anonymes Marketing-HTML.
const response = await fetch('/api/chat', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
session_id: sessionId,
message: userMessage,
business_id: 'office16852-platform'
})
});
const data = await response.json();
const response = await fetch('https://office16852.com/api/widget/chat', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Widget-Key': 'pk_live_...',
'Origin': 'https://your-customer-site.com'
},
body: JSON.stringify({ session_id: sessionId, message: userMessage })
});
// JavaScript — requires logged-in admin / Mission Control (Bearer)
const response = await fetch('/api/chat/message', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer ' + token
},
body: JSON.stringify({
session_id: sessionId,
message: userMessage
})
});
const data = await response.json();
// Python — authenticated only
import requests
response = requests.post(
'https://office16852.com/api/chat/message',
headers={
'Content-Type': 'application/json',
'Authorization': f'Bearer {token}'
},
json={ 'session_id': session_id, 'message': user_message }
)