[ES] API reference, webhooks, and the embeddable widget for Bobโyour governed AI front office.
{
"email": "admin@office16852.com",
"password": "your_password"
}
{
"email": "customer@business.com",
"password": "customer_password"
}
[ES] Three paths: [ES] (1) [ES] Public same-origin anonymous โ POST /api/chat [ES] (e.g. marketing site widget; no login). (2) [ES] Cross-origin embed โ POST /api/widget/chat [ES] with X-Widget-Key [ES] and allowed Origin[ES] . (3) [ES] Authenticated app / Mission Control โ POST /api/chat/session [ES] and POST /api/chat/message [ES] (requires chat.manage [ES] and session/CSRF for cookie auth) โ [ES] not [ES] for anonymous fetch [ES] from public pages.
message, session_id[ES] , optional business_id.
X-Widget-Key, Content-Type: application/json. Origin [ES] must be allowed for the key. See docs/REQUEST_FLOWS.md [ES] in the repository for CORS details.
chat.manage[ES] ). Returns 401 [ES] if called anonymously from a public page โ use POST /api/chat [ES] for that case instead.
{
"session_id": "session_123",
"message": "Hello, I need help with my order"
}
[ES] Add Bob to any website with a single script tag. After onboarding, your widget embed code is available in the Customer Portal under [ES] Widget Setup.
<!-- Paste before </body> --> <script src="https://your-domain.com/widget/loader.js" data-widget-key="YOUR_WIDGET_KEY" data-position="bottom-right" async> </script>
[ES] Personas control how Bob communicates โ tone, name, and system instructions. Every tenant gets a default persona on signup; you can customize it from the Admin Dashboard or the API.
{ name, description, tone, systemPrompt }[ES] Published pricebook is the source of truth. Use the APIs below for live numbers; this table matches pricebook-seed [ES] V1 (adjusts when you publish a new version).
| [ES] Feature | [ES] Starter | [ES] Pro | [ES] Enterprise |
|---|---|---|---|
| [ES] List price (USD/mo) | [ES] $79 | [ES] $249 | [ES] $899 |
| [ES] Included AI credits / mo | [ES] 15,000 | [ES] 75,000 | [ES] 250,000 |
| [ES] Team seats | [ES] Up to 3 | [ES] Up to 10 | [ES] Unlimited |
| [ES] Standard integrations (included) | 1 | 3 | 10 |
| [ES] Support | [ES] Email | [ES] Priority | [ES] Dedicated |
[ES] Use the block that matches your scenario. Do not copy the admin example into anonymous 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 }
)