Endpoints
Chat
Session-authenticated AI chat, chat history, and chat feedback endpoints.
POST
Chat endpoints power the dashboard assistant and public site assistant. They use the signed-in dashboard session when available. Anonymous chat is more tightly rate limited, while authenticated chat uses plan-based message limits.
Streaming responses use this shape:
This page documents application chat endpoints first, then the v1 API-key chat endpoint. For CRM-style customer conversations, see Conversations.
POST /api/chat
Sends chat messages to the assistant. Supports streaming responses whenstream is true, text-only messages, and bounded image attachments in supported formats.
For signed-in users, the assistant also reads saved AI preferences from Settings: tone, response length, language, whether memory is enabled, and saved context notes. Chat memory commands such as “Remember X”, “Forget X”, and “What do you remember?” update or summarize active memories. Active memories are capped at 10 and are treated as business context, not as free-form system instructions.
Ordered chat messages. User message text is bounded and validated before processing.
When
true, returns a text/event-stream response with incremental data: events.Optional page context used to make the assistant more relevant.
GET /api/chat/history
Loads recent persisted chat messages for the signed-in user.Maximum messages to return. The route caps the value.
Optional business UUID to filter history.
POST /api/chat/history
Persists one chat message for cross-device history.DELETE /api/chat/history
Clears the signed-in user’s chat history.POST /api/chat/feedback
Records a thumbs-up or thumbs-down signal for one assistant message.good or bad.Assistant message content being rated.
Client timestamp or stable message timestamp used for de-duplication.
POST /api/v1/chat
Sends one non-streaming message to the API assistant for the caller’s active business context. Requires thechat:write scope.
User message text, 1-4000 characters after trimming.
One of
general, competitors, reviews, content, or marketing.Errors
| Status | Meaning |
|---|---|
400 | Invalid JSON, unsupported attachment, or invalid feedback payload |
401 | Missing session for history or feedback endpoints |
429 | Anonymous or plan-based chat limit exceeded |
500 | Chat, persistence, or feedback storage failed |