Widget API (settings)

The chat widget reads appearance (colour, greeting, position, logo) via a public settings API. If you change something in Chat widget, it's live within about a minute — without pasting the embed again.
Public: retrieve settings
GET https://slimbot.nl/api/widget/settings.php?token=UW_TOKEN&iid=UW_LIJN_ID
Or via alias: /api/widget-settings.php. Response (JSON), including:
brandName,accent,greeting,position(bottom-right/bottom-left)logoUrl,agentName,whitelabel,features,instanceId
Optional: only token (first active line). CORS is open for GET from any website.
Public: installation seen
POST https://slimbot.nl/api/widget/settings.php
Content-Type: application/json
{"action":"seen","token":"UW_TOKEN","iid":123}
The loader does this automatically. In Chat widget you'll then see "Widget seen on a website".
Dashboard: save (logged in)
POST https://slimbot.nl/api/widget/settings.php
Content-Type: application/json
Cookie: (sessie)
{"action":"save","iid":123,"brand_name":"Sophie","accent":"#00b87a",
"greeting":"Hallo!","position":"bottom-right","logo_url":"","agent_name":"Assistent"}
Also PUT / PATCH are allowed. Fields may be camelCase (brandName, logoUrl, …).
Embed + data-overrides
<script src="https://slimbot.nl/widget/loader.php?token=TOKEN&iid=123"
data-color="#0ea5e9" data-name="Campagne" data-greeting="Hoi!"
data-position="bottom-left" async></script>
data-* overrides the dashboard values on that page only. Useful for landing pages.
CMS packages
Download whilst logged in: WordPress plugin or Shopify snippet via Chat widget → Install, or:
/api/widget-cms-pack.php?pack=wordpress/api/widget-cms-pack.php?pack=shopify
For the complete installation guide: Chatbot & website widget.