Complete API Reference and Integration Guide
{
"email": "admin@askbob.ai",
"password": "your_password"
}
{
"email": "customer@business.com",
"password": "customer_password"
}
{
"session_id": "session_123",
"message": "Hello, I need help with my order"
}
// JavaScript fetch example
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 requests example
import requests
response = requests.post(
'http://localhost:3001/api/chat/message',
headers={
'Content-Type': 'application/json',
'Authorization': f'Bearer {token}'
},
json={
'session_id': session_id,
'message': user_message
}
)