Send a Message
Request
Body
Example
Response
The endpoint does not return a
conversation_id — the conversation is keyed by your session_id. If you need to correlate the reply with a server-side conversation record, subscribe to the conversation.started webhook.
Multi-Turn Conversations
Pass the samesession_id on every call to give the chatbot the last 10 turns of history:
Error Responses
Error bodies use Django Ninja’s default{"detail": "..."} shape — no machine-readable code field.
Every successful chat request counts toward your plan’s monthly message quota. Only
role='user' messages count — assistant replies are free. Track usage in Dashboard → Analytics, or upgrade your plan in Plans & Pricing.What Happens Under the Hood
Each call:- Enforces your plan’s monthly message quota and per-conversation rate limit (raises
429if exceeded). - Looks up or creates a
Conversationkeyed by(chatbot_id, session_id). - If a human agent has taken over this conversation, persists the inbound message but skips LLM generation (no reply is returned in that case — the dashboard surfaces it for the agent).
- Saves the user message and fires the
conversation.startedwebhook (if newly created) andmessage.receivedwebhook. - Retrieves relevant context via hybrid vector + BM25 search with RRF fusion.
- Builds the prompt (your chatbot’s system prompt + identity rules + retrieved context + last 10 turns).
- Calls the configured LLM provider (Gemini / OpenAI / Ollama) and saves + returns the reply.
