These are the endpoints the support widget calls. They’re documented so you understand what the widget does. Every request carries the visitor id in x-visitor-id and your workspace key as ?key=, and a visitor can only ever see their own conversations.
Same origin only
Configuration and content#
Widget configuration#
/api/widget/configReturns brandName, accentColor, greeting, botEnabled, aiEnabled, agentName, logoUrl, attachmentsEnabled, maxFileMb and helpBase (the path of your help center). No visitor id needed. A workspace whose subscription has lapsed answers 402, which makes the widget hide itself.
Search articles#
/api/widget/articles?q=Up to 5 published articles matching q (or the first 5 when empty), each with slug, title, excerpt and category.
Identity#
Who am I#
/api/widget/identifyReturns { customer: { name, email } | null } for this visitor.
Identify the visitor#
/api/widget/identifynamestringoptionalemailstringoptionalexternalIdstringoptionalRelaySettings.userId here).metaobjectoptionalConversations#
List my conversations#
/api/widget/conversationsThis visitor’s conversations, newest activity first, with a preview and an unread flag.
Start a conversation#
/api/widget/conversationsbodystringrequiredReturns { conversation, messages }. With the bot on, the bot’s answer is already included, or the conversation has been handed off.
Read a conversation#
/api/widget/conversations/:idReturns the conversation and its messages (never internal notes) and marks your replies as read.
Send a message#
/api/widget/conversations/:id/messagesbodystringrequiredIf the bot is handling the conversation, it answers again. A message reopens a pending or resolved conversation.
Talk to a human#
/api/widget/conversations/:id/escalatenamestringoptionalemailstringoptionalMoves the conversation to Open.
That helped#
/api/widget/conversations/:id/resolveMarks the conversation resolved by the bot.
Live events#
Event stream#
/api/widget/stream?vid=<visitorId>&key=<key>Server-Sent Events. Sends ready, then a conversation event with { conversationId } whenever one of this visitor’s conversations changes. The widget refetches when it gets one.