Manage widgets and use the public widget runtime endpoints.
A web widget is the embeddable configuration that connects a published agent version to your website. The API has two parts: authenticated management endpoints under /core/web-widgets that you call from your backend to create and configure widgets, and unauthenticated public runtime endpoints under /core/public/web-widgets that the embedded widget calls from the browser to start conversations.For the product walkthrough and the embed snippet, see /web-widgets/overview. For domain restrictions, see /web-widgets/allowed-domains-and-security.
The public runtime endpoints are unauthenticated and resolve the organization from the widget id in the path. They are meant to be called from the browser by the embedded widget. Never send a PAT, API key, or X-Anyreach-Org header from browser code.
The widget runs whatever agent_version_id you give it. Point it at a published agent version so the embedded widget can dispatch real conversations. See /web-widgets/overview for how versions are published.
PUT /core/web-widgets/{id}Send only the fields you want to change. agent_id, agent_version_id, domains, published, and config are all optional and replace the stored value when present.
POST /core/web-widgets/{id}/auto-brandFetches brand data (colors, logos, and related assets) for a domain so you can pre-fill widget styling. The widget must exist.
Field
Type
Description
domain
string
Domain to look up. Protocol, www., and trailing slash are stripped automatically
Returns the resolved brand object. Responds with 404 if no brand is found for the domain.
These power the embedded widget in the browser. They are unauthenticated: the organization is resolved from the widget id in the path, and the conversation channel is always WEBRTC. All paths are prefixed with /core/public/web-widgets.
GET /core/public/web-widgets/{id}Returns the same widget object as the management endpoints. The embedded widget uses it to render appearance and behavior.
POST /core/public/web-widgets/{id}/conversationsStarts a new WEBRTC conversation, or resumes an existing one when conversation_id is set. The response carries the LiveKit connection_details the browser uses to join the call.
Field
Type
Description
user_id
string
Visitor identifier. Required
custom_metadata
object
Optional metadata stored on the conversation
conversation_id
string
Existing conversation to resume. When omitted, a new conversation is created
When resuming, the conversation must belong to this widget or the request returns 403; an unknown conversation_id returns 404.The response is a JSON object:
Field
Type
Description
conversation
object
The created or resumed conversation
connection_details
object
LiveKit connection info (url, token, room) for joining the WebRTC session
capabilities
object
supportsVideoInput and supportsScreenShare, derived from the agent’s vision configuration
GET /core/public/web-widgets/{id}/conversationsLists conversations scoped to this widget. Defaults to the WEBRTC channel. All query parameters are optional.
POST /core/public/web-widgets/{id}/conversations/{conversation_id}/feedbackStores post-conversation feedback on the conversation. The conversation must already exist and belong to the widget, and the widget must have a feedback form configured.
Field
Type
Description
data
object
Feedback field values keyed by field id
Only keys that match the widget’s configured feedback-form field ids are stored; others are dropped. The endpoint enforces:
Limit
Value
Max payload size
16 KB (serialized JSON)
Submissions per conversation
One — a second submission returns 409
Returns { "status": "ok" } on success. It returns 400 if the widget collects no feedback or no valid fields were submitted, and 413 if the payload is too large.