Create a KB widget
POST /api/workspaces/{workspaceId}/widgets/kb
Creates a new knowledge base widget for embedding on external websites. Configure the visual appearance (colors, fonts, CSS), security (allowed origins), and display mode (grid or list). The widget renders approved KB entries from the workspace and provides a search interface for visitors.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”The workspace to create the widget in.
Request Body
Section titled “Request Body ”object
Display name for the widget.
Example
Help Center WidgetPrimary color as a hex code.
Example
#0166A3Font family for widget text.
Example
Inter, sans-serifCustom CSS injected into the widget iframe.
Domains allowed to embed this widget.
Example
[ "https://www.example.com"]Whether the widget should be active immediately.
Example
trueColor theme for the widget.
Example
autoLayout mode for displaying entries.
Example
gridResponses
Section titled “ Responses ”The widget was created.
A knowledge base widget that can be embedded on external websites. The widget renders a searchable, branded interface showing approved KB entries from the associated workspace. Widgets are secured by allowed origins and can be customized with your brand colors, fonts, and CSS.
object
Unique identifier for the widget.
Example
kw1a2b3c-5678-9abc-def0-1234567890abThe tenant this widget belongs to.
Example
a0b1c2d3-4567-89ab-cdef-0123456789abThe workspace whose KB entries are displayed in this widget.
Example
w1a2b3c4-5678-9abc-def0-1234567890abDisplay name for the widget, used in the dashboard to identify it.
Example
Help Center WidgetPrimary color for the widget UI as a hex code.
Example
#0166A3Font family for the widget text. Must be a web-safe font or one loaded on the host page.
Example
Inter, sans-serifCustom CSS injected into the widget iframe for advanced styling.
Example
.widget-header { border-bottom: 2px solid #0166A3; }List of domains allowed to embed this widget. The widget will refuse to load on unlisted origins. Use ’*’ to allow all origins (not recommended for production).
Example
[ "https://www.example.com", "https://help.example.com"]Whether the widget is currently active. Disabled widgets return an error when loaded.
Example
trueColor theme for the widget. ‘auto’ follows the user’s system preference.
Example
autoLayout mode for displaying KB entries. ‘grid’ shows entries as cards, ‘list’ shows them in a vertical list.
Example
gridPublic key used to authenticate the widget when loaded on an external page.
Example
pk_wgt_a1b2c3d4e5f6Timestamp when the widget was created.
Example
2026-03-01T10:00:00.000ZTimestamp when the widget was last updated.
Example
2026-03-20T15:30:00.000ZValidation error.
Standard error response returned by all endpoints on failure.
object
A human-readable error message describing what went wrong.
Example
Conversation not found