Chat & widget
Widget config
Branding, greeting, starter questions, and lead-capture settings for an assistant's chat widget. These drive what the Public Chatbot config endpoint returns.
GET
/agents/{id}/widget agents:readGet widget config
The assistant's widget configuration (created with defaults if none exists).
Path parameters
| id* | uuid | Assistant id. |
bash
curl https://api.bolchoai.in/v1/agents/$ID/widget \
-H "Authorization: Bearer $BOLCHO_API_KEY"Response
json
{ "enabled": true, "botName": "Acme Assistant", "color": "#10B981", "welcome": "Hi! How can I help you today?", "placeholder": "Type your message…", "suggestions": [], "leadCapture": false, "leadFields": ["name", "email"], "leadRequired": false, "hideBranding": false }PUT
/agents/{id}/widget agents:writeUpdate widget config
Update branding and lead capture. Only the fields you send are changed.
Path parameters
| id* | uuid | Assistant id. |
Body
| enabled | boolean | Turn the widget on/off. |
| botName | string | Display name in the widget header. |
| avatarUrl | string | Avatar image URL. |
| color | string | Hex accent colour. |
| welcome | string | Greeting message. |
| placeholder | string | Input placeholder text. |
| suggestions | string[] | Starter / predefined questions. |
| leadCapture | boolean | Ask visitors for contact details. |
| leadFields | string[] | Any of name | email | phone. |
| leadCustomQuestion | string | An extra lead-form question. |
| leadRequired | boolean | Require the lead form before chatting. |
| hideBranding | boolean | Hide 'Powered by Bolcho AI' (ignored unless white-label is granted to the workspace). |
bash
curl -X PUT https://api.bolchoai.in/v1/agents/$ID/widget \
-H "Authorization: Bearer $BOLCHO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"botName": "string",
"avatarUrl": "string",
"color": "string",
"welcome": "string",
"placeholder": "string",
"suggestions": [
"..."
],
"leadCapture": true,
"leadFields": [
"..."
],
"leadCustomQuestion": "string",
"leadRequired": true,
"hideBranding": true
}'