Streaming response flow
Send a message with SSE and receive partial or final model output in real time.
Available now
Integrate Lumika into your own frontend or backend using a workspace-scoped integration token, streaming responses, and polling-based history sync.
Developer Highlights
Send a message with SSE and receive partial or final model output in real time.
Reuse your own customer identifier as conversationId for stable thread continuity.
Use message IDs and the afterId cursor to deduplicate and incrementally fetch updates.
Conversation history endpoint returns only customer/assistant records, never internal notes.
For browser-based clients, optionally restrict requests to configured allowed domains.
Architecture and Security
Each API integration account has a unique integration token generated in your workspace.
conversationId is your customer/session key and should be stable per user when continuity is needed.
The history endpoint returns a normalized feed suitable for polling-based chat UIs and API clients.
{
"conversationId": "customer-42",
"messages": [
{
"id": "a12f...",
"actor": "customer",
"type": "message",
"body": "Hey, can I reschedule?",
"createdAt": "2026-02-09T20:05:13.021Z"
}
],
"lastMessageId": "a12f..."
}Quick Start
Use these steps for API clients, backend workers, or custom frontends.
const params = new URLSearchParams({
integrationToken: 'YOUR_INTEGRATION_TOKEN',
textContent: 'Hi, can you help me with billing?',
conversationId: 'customer-42'
});
const source = new EventSource(
'https://api.your-domain.com/conversation/sse?' + params.toString()
);
source.onmessage = (event) => {
const payload = JSON.parse(event.data);
console.log(payload);
};const query = new URLSearchParams({
integrationToken: 'YOUR_INTEGRATION_TOKEN',
conversationId: 'customer-42',
afterId: 'LAST_MESSAGE_ID',
limit: '100'
});
const res = await fetch('https://api.your-domain.com/conversation/history?' + query.toString());
const history = await res.json();Endpoints
These endpoints are available for API and Website Widget integrations and support conversation history sync.
/conversation/sse?integrationToken=...&textContent=...&conversationId=...?Send one message and receive a streamed response. conversationId is optional on first message. Uses GET + query params.
/conversation/history?integrationToken=...&conversationId=...&afterId=...&limit=...?Fetch conversation history and new records using the afterId cursor and message IDs.
Get started
Create an API integration, send your first SSE request, and wire polling to keep message history in sync.