API reference
Widget config API.
The widget calls this endpoint on load to fetch public appearance and plan configuration for a chatbot.
Endpoint
GET https://[project].supabase.co/functions/v1/widget-config?token=<embed_token>
Query parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
token | string | Yes | Embed token from dashboard → Embed tab. This uniquely identifies the chatbot. |
Response
{
"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
| Status | Meaning |
|---|---|
400 | Missing token parameter. |
401 | Token not found or chatbot inactive. |