GET /widget/config: what the server sends the widget
For developers, in code: the served configuration of one widget — appearance, behaviour, the localized chrome strings, the FAQ chips, the gates — and the six keys that are fixed.
GET /widget/config?code=default&lang=uk
X-Widget-Key: wk_…
Returns the owner’s configuration of one widget, localized for lang, in snake_case. The widget
calls it once at load and maps the keys to window.ShukaiConfig’s camelCase
(Configuration). Cached for an hour per widget, version and language;
a change in the panel bumps the version, so the next load sees it.
Response
| Key | Type | Meaning |
|---|---|---|
code, agent_code |
string | the widget and its agent; agent_code is "" for a widget with no agent — chat then answers 409 |
active |
boolean | the offline gate: false when the site is out of credits or not on a plan; the widget mounts nothing. Cannot be overridden from the page |
color, position, theme, launcher, custom_css |
appearance, as saved; launcher is { type, value, label, container } |
|
voice_character, voice_orb_color, orb_colours |
the orb’s skin, body colour and { skin, colours: { slot: "#rrggbb" } } for that skin only |
|
launcher_attention |
off · subtle · prominent |
the attract level; teaser_enabled is derived from it |
greeting |
string | localized for lang — the widget’s override or the agent’s |
faqs |
string[] | the suggestion chips, localized |
strings |
object | the widget’s own text for lang — the keys on Languages and RTL |
supported_languages |
string[] | the site’s languages, for the spoken-language picker |
conversation_mode_enabled, voice_input_enabled, voice |
the two voice switches and the owner’s per-language voice map (read by /tts, served for completeness) |
|
page_actions_enabled, page_actions_submit_policy, page_read_values |
the three page-action switches; page_actions_enabled is true only when the owner turned it on and the plan includes it |
|
page_read |
boolean | the agent may read the screen (it sees app screens, or page actions are stored on but not on the plan), even where it may not act |
proactive |
boolean | some screen this agent sees has a proactive tool and the plan allows it — arms the tick |
navigate_enabled |
boolean | the widget may perform a same-origin navigate itself |
handoff_collect, handoff_always, handoff_targets |
the in-chat form, the «Contact us» entrance, the link-out targets [{ mode, value, channel }] |
|
ai_label |
boolean | the «AI assistant» tag above the composer; the owner switches it on |
action_button_types |
string[] | which action types are drawn as buttons |
The six fixed keys
Served under their old names with fixed values, whatever the widget row holds — the wire contract with the widget is unchanged and a page may still override them, changing only the page:
| Key | Fixed value |
|---|---|
show_action_buttons |
true |
teaser_delay_ms |
4000 |
voice_input_pace |
"normal" |
voice_input_autosend |
true |
default_mode_desktop, default_mode_mobile |
"voice" — the character’s mic invites; nothing auto-starts |
teaser_enabled is a seventh, derived key: true unless launcher_attention is off.
Statuses
401 / 403 as on every runtime endpoint; 404 Unknown widget code for this key. A request
from the panel’s own trusted origin is served active: true and bypasses the cache, so the
preview reflects the form as it is edited.