Chat endpoint for the AI website builder.
Shares the app builder’s agent loop and typed SSE protocol (text / tool_call / tool_result / files_changed / done / error). The thread is the source of truth: history is loaded from the landing page’s stored threads, the user message is persisted immediately, and the assistant message (with its tool-call log) is persisted when the stream ends — the client never bulk-saves history.
Legacy clients (no clientMessageId, inline messages history) still get
the old raw-text stream so an older frontend keeps working.
Authorizations
Company API key - scoped to a specific company. Generate from the Integrations page in your dashboard.
Path Parameters
Body
Chat message
Request body for AI chat
Company ID
User message
Uploaded image attachments (design references)
Client-generated id for the user message (dedupe)
Previous chat messages (legacy clients only — thread history is stored server-side)
Chat thread to append to (defaults to the active thread)
Response
Missing required fields
Error message

