Widget Settings
GET /settings/:id
Returns the config needed to model the widget. Theme colors, icons, form fields, required fields, and greeting messages are read from this response. JWT is not required.
The :id parameter is the chat application's UUID (appId).
Request
GET /settings/550e8400-e29b-41d4-a716-446655440000 HTTP/1.1
Host: widget-api.chatbot.aithinks.net
const settings = await fetch(`${BASE_URL}/settings/${APP_ID}`)
.then((r) => r.json());
Successful response
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"botName": "Destek Botu",
"name": "Müşteri Destek",
"widgetConfigs": {
"requiredFields": ["email"],
"greetingMessages": [
{ "content": "Merhaba! Size nasıl yardımcı olabilirim?" }
],
"primaryBackgroundColor": "#007bff",
"primaryTextColor": "#FFFFFF",
"contentBackgroundColor": "#FFFFFF",
"sentMessageBubbleBgColor": "#007bff",
"sentMessageBubbleTextColor": "#FFFFFF",
"receivedMessageBubbleBgColor": "#f1f1f1",
"receivedMessageBubbleTextColor": "#000000",
"aiIconUrl": "https://cdn.example.com/bot-icon.png",
"widgetIconUrl": "https://cdn.example.com/widget-icon.png"
}
}
Fields
| Field | Type | Description |
|---|---|---|
id | string (UUID) | Chat application ID |
botName | string | Bot display name |
name | string | Chat application title |
widgetConfigs | object | Config to model the widget (theme, form, greeting) |
widgetConfigs keys
| Key | Type | Description |
|---|---|---|
requiredFields | string[] | Required field names in the Visitor Registration body |
greetingMessages | { content: string }[] | Greeting messages added to the chat after registration |
formInputs | string[] | Fields to show on the form (e.g. firstName, lastName, email) |
primaryBackgroundColor | string | Primary color |
primaryTextColor | string | Primary text color |
inputTextColor / inputBackgroundColor | string | Input field colors |
footerBackgroundColor / contentBackgroundColor | string | Footer and content background |
sentMessageBubbleBgColor / sentMessageBubbleTextColor | string | Visitor bubble colors |
receivedMessageBubbleBgColor / receivedMessageBubbleTextColor | string | Bot/agent bubble colors |
formBackgroundColor | string | Form background |
aiIconUrl / widgetIconUrl / userIconUrl | string | Icon URLs |
The contents of widgetConfigs may vary by application; ignore unknown keys.
Errors
| Status | Meaning |
|---|---|
404 | No chat application found for the given id |