API reference

Chat and streaming

The public endpoint the widget uses, and how to drive it yourself.

Send a message

POST /api/v1/chat

The body carries the bot id, the message, and a conversation id to continue an existing thread. Omitting the conversation id starts a new one and returns its id in the response.

Streaming

Replies stream token by token, so the visitor sees words appear rather than waiting for a wall of text. Read the stream incrementally; do not buffer to completion before rendering.

Sources

A grounded reply carries the sources it drew on. Render them: the source attribution is what makes the answer trustworthy, and hiding it makes a well-behaved bot look like a guessing one.

Replaying a conversation

GET /api/v1/chat/{conversationId}

Returns the message history, which is how the widget restores a conversation when a visitor returns.

This endpoint is public by design

It is called from visitors' browsers, so it is not behind a user token. Its protection is the bot's allowed-domain list: set that before you go live.

On this page