Chat widget
The embeddable chat widget's appearance.
Base URL https://futuresmart.ai/database-agent/api · every request sends X-API-Key. Samples read the key from DATABASE_AGENT_API_KEY. All endpoints
Retrieve Widget Settings
/v1/agents/{agent_id}/widget/settingsGet the agent's widget settings
Authenticated callers get the full record. Anonymous callers are allowed only when the agent
has opted this surface in (is_public, or fullscreen_is_public with ?from_full_screen=true)
and their Origin matches the matching allowlist; they receive display fields only.
An agent that has never been configured returns the documented defaults rather than 404.
Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | Agent ID |
Response · 200
| Name | Type | Description |
|---|---|---|
widget_settingsrequired | WidgetSettings | The widget's appearance. Owner/timestamp fields are absent for anonymous callers — see `PUBLIC_FIELDS` in `api/v1/utils/widgets_helper.py`. |
↳ heading | string | null | |
↳ sub_heading | string | null | |
↳ greet_message | string | null | |
↳ color | string | null | |
↳ show_sources | boolean | null | |
↳ widget_icon | string | null | |
↳ widget_avatar | string | null | |
↳ user_id | string | null | Owner; omitted for public callers |
↳ created_at | string | null | Omitted for public callers |
↳ updated_at | string | null | Omitted for public callers |
Other responses
422Validation Error
Response shape (200)
{
"widget_settings": {}
}Save Widget Settings
/v1/agents/{agent_id}/widget/settingsCreate or update the agent's widget settings
Multipart. Every field is optional and only what is sent is written, so saving one field
leaves the rest untouched. An uploaded file takes precedence over the matching _url.
Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | Agent ID |
Request body · multipart/form-data (optional)
| Name | Type | Description |
|---|---|---|
heading | string | null | |
sub_heading | string | null | |
greet_message | string | null | |
color | string | null | |
show_sources | boolean | null | |
widget_icon | string | null | |
widget_avatar | string | null | |
widget_icon_url | string | null | |
widget_avatar_url | string | null |
Response · 200
| Name | Type | Description |
|---|---|---|
messagerequired | string | |
widget_settingsrequired | WidgetSettings | The widget's appearance. Owner/timestamp fields are absent for anonymous callers — see `PUBLIC_FIELDS` in `api/v1/utils/widgets_helper.py`. |
↳ heading | string | null | |
↳ sub_heading | string | null | |
↳ greet_message | string | null | |
↳ color | string | null | |
↳ show_sources | boolean | null | |
↳ widget_icon | string | null | |
↳ widget_avatar | string | null | |
↳ user_id | string | null | Owner; omitted for public callers |
↳ created_at | string | null | Omitted for public callers |
↳ updated_at | string | null | Omitted for public callers |
Other responses
422Validation Error
Response shape (200)
{
"message": "<message>",
"widget_settings": {}
}Remove Widget Settings
/v1/agents/{agent_id}/widget/settingsDelete the agent's widget settings
Soft delete: the row is kept with deleted_at/deleted_by so the change stays auditable, and
the agent falls back to the default appearance.
Credential Database Agent API key for this agent (X-API-Key)
Path parameters
| Name | Type | Description |
|---|---|---|
agent_idrequired | string | Agent ID |
Other responses
422Validation Error