Widget config
Read and update the embeddable chat widget's configuration.
Widget config API
Reads and writes the project's widget configuration. Updates bust the edge cache immediately so changes appear on the embedded widget within seconds.
Endpoints
| Method | Path | Scope |
|---|---|---|
GET | /v1/projects/{projectId}/widget/config | read |
PATCH | /v1/projects/{projectId}/widget/config | widget:write |
Get config
bashcurl https://api.rogeriq.com/api/v1/projects/prj_xxx/widget/config \ -H "X-API-Key: riq_xxx"
bashrogeriq widget config
tsconst config = await roger.widget.getConfig();
Response
json{ "data": { "project_id": "prj_xxx", "enabled": true, "position": "bottom-right", "color": "#F26B3A", "welcome_message": "Hi! How can we help?", "show_branding": true, "theme": "light", "locale": "en", "...": "more provider-specific fields" }}
The response is open-ended — any new widget field added in future releases will appear here without an SDK upgrade.
Update config
bashcurl -X PATCH https://api.rogeriq.com/api/v1/projects/prj_xxx/widget/config \ -H "X-API-Key: riq_xxx" \ -H "Content-Type: application/json" \ -d '{"theme": "dark", "color": "#5b21b6", "welcome_message": "Need help?"}'
bashrogeriq widget set --theme dark --primary-color '#5b21b6' --welcome-message "Need help?"
tsawait roger.widget.updateConfig({ theme: "dark", color: "#5b21b6", welcome_message: "Need help?",});
Common fields
Hide the widget without removing the install snippet.
light | dark | auto.
Hex color, e.g. #F26B3A.
bottom-right | bottom-left.
First message shown when the widget opens.
Toggle the "Powered by RogerIQ" footer.
ISO 639-1 code, e.g. en, fr, de. Drives the widget's UI language.
The widget supports many more fields (operating hours, secure mode, custom CSS, etc). They all accept partial updates — only include fields you want to change.
Cache behavior
The widget runtime reads its config from an edge cache keyed by project
id. On every successful PATCH, the cache key widget-config:{pid} is
deleted server-side so the next widget load (within seconds) sees the
new values.