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

MethodPathScope
GET/v1/projects/{projectId}/widget/configread
PATCH/v1/projects/{projectId}/widget/configwidget:write

Get config

bash
curl https://api.rogeriq.com/api/v1/projects/prj_xxx/widget/config \ -H "X-API-Key: riq_xxx"

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

bash
curl -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?"}'

Common fields

enabledbooleanbody

Hide the widget without removing the install snippet.

themestringbody

light | dark | auto.

colorstringbody

Hex color, e.g. #F26B3A.

positionstringbody

bottom-right | bottom-left.

welcome_messagestringbody

First message shown when the widget opens.

show_brandingbooleanbody

Toggle the "Powered by RogerIQ" footer.

localestringbody

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.

Ask a question... ⌘I