Get what a chat page needs to render and connect
GET /Platform/chat/bootstrap
Get what a chat page needs to render and connect.
Called by a chat front end after it has a visitor credential: a chat
session token from the hosted page, a personal link's token, or a resume
token from a resume link. Returns the agent, the socket address, the
flow's settings, and mode: agent for a new chat (a personal link
included), resume when the credential reopens one conversation. Connect to ws_url with the same credential. Read-only.
When the session is close to expiry, a renewed token comes back in the
X-Hilus-Session-Refreshed response header (never in the body); store
it for the next call.
Returns
ChatBootstrapResponse
agent_id: optional str or null. Id of the agent behind the chat.agent_name: optional str or null. Display name of the agent.agent_token: optional str or null. The chat's share slug (sh_...), used to start a fresh chat; null in resume mode, which cannot start one.ws_url: optional str or null. Chat socket address. Connect with the same credential used for this call; it is never part of the URL.conversation_id: optional str or null. Conversation the session is bound to: always set in resume mode, otherwise only when one already exists.mode: optional str or null.agentfor a normal chat session,resumefor a link that reopens one conversation.diarization_enabled: optional bool. Whether voice transcripts carry speaker labels.webchat_config: optional dict or null. The flow's chat settings: appearance, whether text and voice are allowed, and, when the launcher offers several flows,launcher.items: each card'skind(chat,pagesorform), publicslug,label,subtitleandicon, main card first.brand_name: optional str or null. Brand name to show next to staff replies (<staff name> · <brand>); null shows the staff name alone.title: optional str or null. Title shown at the top of the chat: the chat's name, else the practice name; null shows the agent's name.intake_form_slug: optional str or null. Share slug of a form to fill in before a new conversation starts; null starts the chat directly.intake_form_frequency: optional str. When the intake form is shown:once_per_visitororevery_conversation.max_message_chars: optional int or null. Longest visitor message accepted, in characters; null means no limit.escalation_options: optional dict or null. How a visitor can ask for a person, when escalation is enabled; null otherwise.resume_window_hours: optional float. Hours after the last activity during which an embed may reopen the visitor's conversation automatically.
Example request
curl -X GET "https://api.hilus.ai/Platform/chat/bootstrap" \
-H "Authorization: Bearer $HILUS_API_KEY"