Get Chat Widget configuration
curl --request GET \
--url https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-config \
--header 'x-api-key: <api-key>'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-config"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "71b1f0ad-b3eb-46cc-b04d-37f020cbbe43",
"message": "Chat SDK config retrieved successfully",
"response": {
"chatSdkConfig": {
"enabled": true,
"allowedOrigins": [
"https://example.com"
],
"windowCustomizations": {
"header": {
"title": "Support Bot",
"subtitle": "How can I help you?",
"logo": "https://example.com/logo.svg",
"backgroundColor": "#1A73E8",
"textColor": "#FFFFFF"
},
"body": {
"backgroundColor": "#ffffff",
"fontSize": "14px",
"textColor": "#101828"
},
"userMessage": {
"backgroundColor": "#0087c7",
"fontSize": "14px",
"textColor": "#ffffff"
},
"botMessage": {
"backgroundColor": "#f9fafb",
"fontSize": "14px",
"textColor": "#101828"
},
"footer": {
"backgroundColor": "#ffffff",
"textColor": "#101828",
"fontSize": "14px",
"infoText": "Powered by Gnani",
"input": {
"backgroundColor": "#ffffff",
"borderColor": "#0087c7",
"textColor": "#101828",
"placeholder": "Type here..."
},
"button": {
"backgroundColor": "#101828",
"textColor": "#ffffff"
}
}
},
"widgetCustomizations": {
"buttonStyles": {
"backgroundColor": "#1A73E8",
"width": "60px",
"height": "60px"
}
},
"quickActions": null,
"callTransfer": null,
"clearChat": null
}
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}Chat SDK API
Get Chat Widget Config
Retrieve the current Chat Widget configuration for an agent
GET
/
v1
/
agents
/
{botId}
/
chat-sdk-config
Get Chat Widget configuration
curl --request GET \
--url https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-config \
--header 'x-api-key: <api-key>'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-config"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-config', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"requestId": "71b1f0ad-b3eb-46cc-b04d-37f020cbbe43",
"message": "Chat SDK config retrieved successfully",
"response": {
"chatSdkConfig": {
"enabled": true,
"allowedOrigins": [
"https://example.com"
],
"windowCustomizations": {
"header": {
"title": "Support Bot",
"subtitle": "How can I help you?",
"logo": "https://example.com/logo.svg",
"backgroundColor": "#1A73E8",
"textColor": "#FFFFFF"
},
"body": {
"backgroundColor": "#ffffff",
"fontSize": "14px",
"textColor": "#101828"
},
"userMessage": {
"backgroundColor": "#0087c7",
"fontSize": "14px",
"textColor": "#ffffff"
},
"botMessage": {
"backgroundColor": "#f9fafb",
"fontSize": "14px",
"textColor": "#101828"
},
"footer": {
"backgroundColor": "#ffffff",
"textColor": "#101828",
"fontSize": "14px",
"infoText": "Powered by Gnani",
"input": {
"backgroundColor": "#ffffff",
"borderColor": "#0087c7",
"textColor": "#101828",
"placeholder": "Type here..."
},
"button": {
"backgroundColor": "#101828",
"textColor": "#ffffff"
}
}
},
"widgetCustomizations": {
"buttonStyles": {
"backgroundColor": "#1A73E8",
"width": "60px",
"height": "60px"
}
},
"quickActions": null,
"callTransfer": null,
"clearChat": null
}
}
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}What it does: Retrieve the complete Chat Widget (Chat SDK) configuration for a specific agent. This includes all visual customizations for the chat window and launcher button, the list of allowed origins for CORS, and whether the widget is currently enabled.
Use this endpoint to inspect the current widget settings before making updates via Update Chat Widget Config.
Required Permission
agents
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
botId | string | Yes | Unique agent identifier. |
Query Parameters
| Name | Type | Required | Description |
|---|---|---|---|
environment | string | No | Target environment. Default: development. |
Minimum working example
curl "https://api.inya.ai/platform/v1/agents/fb79920229d144608ebf665a10e50275/chat-sdk-config?environment=development" \
-H "x-api-key: <your_api_key>"
Response
Success (200)
{
"status": "success",
"requestId": "71b1f0ad-b3eb-46cc-b04d-37f020cbbe43",
"message": "Chat SDK config retrieved successfully",
"response": {
"chatSdkConfig": {
"enabled": true,
"allowedOrigins": ["https://example.com"],
"windowCustomizations": {
"header": {
"title": "Support Bot",
"subtitle": "How can I help you?",
"logo": "https://example.com/logo.svg",
"backgroundColor": "#1A73E8",
"textColor": "#FFFFFF"
},
"body": {
"backgroundColor": "#ffffff",
"fontSize": "14px",
"textColor": "#101828"
},
"userMessage": {
"backgroundColor": "#0087c7",
"fontSize": "14px",
"textColor": "#ffffff"
},
"botMessage": {
"backgroundColor": "#f9fafb",
"fontSize": "14px",
"textColor": "#101828"
},
"footer": {
"backgroundColor": "#ffffff",
"textColor": "#101828",
"fontSize": "14px",
"infoText": "Powered by Gnani",
"input": {
"backgroundColor": "#ffffff",
"borderColor": "#0087c7",
"textColor": "#101828",
"placeholder": "Type here..."
},
"button": {
"backgroundColor": "#101828",
"textColor": "#ffffff"
}
}
},
"widgetCustomizations": {
"buttonStyles": {
"backgroundColor": "#1A73E8",
"width": "60px",
"height": "60px"
}
},
"quickActions": null,
"callTransfer": null,
"clearChat": null
}
}
}
Response Fields
response.chatSdkConfig
| Field | Type | Description |
|---|---|---|
enabled | boolean | Whether the Chat Widget is currently active. |
allowedOrigins | string[] | Whitelisted domains permitted to embed and use the widget (CORS). |
quickActions | object | null | Quick-reply action buttons shown to the user. null if not configured. |
callTransfer | object | null | Configuration for transferring the chat to a live agent. null if not configured. |
clearChat | object | null | Configuration for the clear-chat control. null if not configured. |
windowCustomizations
| Section | Fields | Description |
|---|---|---|
header | title, subtitle, logo, backgroundColor, textColor | Chat window header bar appearance. |
body | backgroundColor, fontSize, textColor | Chat transcript area background and text styles. |
userMessage | backgroundColor, fontSize, textColor | Style for user-sent message bubbles. |
botMessage | backgroundColor, fontSize, textColor | Style for agent-sent message bubbles. |
footer | backgroundColor, textColor, fontSize, infoText, input, button | Footer bar including the text input field and send button. |
widgetCustomizations
| Section | Fields | Description |
|---|---|---|
buttonStyles | backgroundColor, width, height | Styles for the floating launcher button that opens the chat window. |
Errors
404 Not Found - Agent not found{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Agent not found"
}
Use Cases
- Retrieving widget configuration before updating it
- Displaying current widget settings in an administration dashboard
- Exporting widget configuration for backup or audit purposes
Fetch the current configuration before making updates so you can perform partial modifications without overwriting fields you intend to keep.
Save the
requestId from every response. You will need it if you contact Gnani support to trace a specific request.Authorizations
API key with 'agents' permission
Path Parameters
Unique identifier of the agent
Query Parameters
Target environment. Default is development.
Available options:
development, staging, production Was this page helpful?