Dokumentacja API, webhooki i osadzalny widget Boba — wasz zarządzany front office AI.
{
"email": "admin@office16852.com",
"password": "your_password"
}
{
"email": "customer@business.com",
"password": "customer_password"
}
Trzy ścieżki: (1) Publik, ta sama domena, anonim. → POST /api/chat (np. widget na stronie marketingowej; bez logowania). (2) Osadzenie cross-origin → POST /api/widget/chat with X-Widget-Key and allowed Origin. (3) Uwierzytelniona aplikacja / Mission Control → POST /api/chat/session i POST /api/chat/message (wymaga chat.manage and session/CSRF for cookie auth) — nie for anonymous fetch ze stron publicznych.
message, session_id, opcjonalnie business_id.
X-Widget-Key, Content-Type: application/json. Origin must be allowed for the key. See docs/REQUEST_FLOWS.md w repozytorium znajdziesz szczegóły CORS.
chat.manage). Zwraca 401 if called anonymously from a public page — use POST /api/chat dla tego przypadku zamiast tego.
{
"session_id": "session_123",
"message": "Hello, I need help with my order"
}
Dodaj Boba do dowolnej strony jednym tagiem skryptu. Po onboardingu kod osadzenia widgetu jest dostępny w Portalu Klienta w sekcji Konfiguracja widżetu.
<!-- 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>
Persona definiują sposób wypowiedzi Boba — ton, imię, polecenia. Default przy rejestracji; edycja w admin/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 (dostosowuje się po opublikowaniu nowej wersji).
| Funkcja | Startowy | Pro (wersja) | Enterprise |
|---|---|---|---|
| Cena katalogowa (USD/mies.) | $79 | $249 | $899 |
| Dołączone kredyty AI / mies. | 15,000 | 75,000 | 250,000 |
| Miejsca w zespole | Do 3 | Do 10 | Bez limitu |
| Standardowe integracje (w cenie) | 1 | 3 | 10 |
| Wsparcie | Priorytet | Dedykowany |
Użyj bloku dopasowanego do Twojego scenariusza. Nie kopiuj przykładu administratora do anonimowego HTML marketingowego.
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 }
)