Minyut/Docs
API reference

Widget config API.

The widget calls this endpoint on load to fetch public appearance and plan configuration for a chatbot.


Endpoint

bash
GET https://[project].supabase.co/functions/v1/widget-config?token=<embed_token>

Query parameters

ParameterTypeRequiredDescription
tokenstringYesEmbed token from dashboard → Embed tab. This uniquely identifies the chatbot.

Response

json
{
  "chatbot_id": "uuid-of-the-chatbot",
  "bot_name": "Support Bot",
  "primary_color": "#18181b",
  "position": "bottom-right",
  "welcome_message": "Ask me anything.",
  "placeholder_text": "Type your question…",
  "show_branding": true,
  "status": "ready",
  "response_tone": "friendly"
}

Responses are cached for up to five minutes at the CDN edge. If you update widget appearance in the dashboard, allow a few minutes before every visitor sees the change.

The chatbot_id in the response is what you pass to the query endpoint when building a custom UI.

Errors

StatusMeaning
400Missing token parameter.
401Token not found or chatbot inactive.