Update Chat Widget configuration
curl --request PUT \
--url https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-config \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"chatSdkConfig": {
"enabled": true,
"allowedOrigins": [
"<string>"
],
"windowCustomizations": {
"header": {
"title": "<string>",
"subtitle": "<string>",
"logo": "<string>",
"backgroundColor": "<string>",
"textColor": "<string>"
},
"body": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"userMessage": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"botMessage": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"footer": {
"backgroundColor": "<string>",
"textColor": "<string>",
"fontSize": "<string>",
"infoText": "<string>",
"input": {
"backgroundColor": "<string>",
"borderColor": "<string>",
"textColor": "<string>",
"placeholder": "<string>"
},
"button": {
"backgroundColor": "<string>",
"textColor": "<string>"
}
}
},
"widgetCustomizations": {
"buttonStyles": {
"backgroundColor": "<string>",
"width": "<string>",
"height": "<string>"
}
}
}
}
'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-config"
payload = { "chatSdkConfig": {
"enabled": True,
"allowedOrigins": ["<string>"],
"windowCustomizations": {
"header": {
"title": "<string>",
"subtitle": "<string>",
"logo": "<string>",
"backgroundColor": "<string>",
"textColor": "<string>"
},
"body": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"userMessage": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"botMessage": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"footer": {
"backgroundColor": "<string>",
"textColor": "<string>",
"fontSize": "<string>",
"infoText": "<string>",
"input": {
"backgroundColor": "<string>",
"borderColor": "<string>",
"textColor": "<string>",
"placeholder": "<string>"
},
"button": {
"backgroundColor": "<string>",
"textColor": "<string>"
}
}
},
"widgetCustomizations": { "buttonStyles": {
"backgroundColor": "<string>",
"width": "<string>",
"height": "<string>"
} }
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chatSdkConfig: {
enabled: true,
allowedOrigins: ['<string>'],
windowCustomizations: {
header: {
title: '<string>',
subtitle: '<string>',
logo: '<string>',
backgroundColor: '<string>',
textColor: '<string>'
},
body: JSON.stringify({backgroundColor: '<string>', fontSize: '<string>', textColor: '<string>'}),
userMessage: {backgroundColor: '<string>', fontSize: '<string>', textColor: '<string>'},
botMessage: {backgroundColor: '<string>', fontSize: '<string>', textColor: '<string>'},
footer: {
backgroundColor: '<string>',
textColor: '<string>',
fontSize: '<string>',
infoText: '<string>',
input: {
backgroundColor: '<string>',
borderColor: '<string>',
textColor: '<string>',
placeholder: '<string>'
},
button: {backgroundColor: '<string>', textColor: '<string>'}
}
},
widgetCustomizations: {
buttonStyles: {backgroundColor: '<string>', width: '<string>', height: '<string>'}
}
}
})
};
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": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Chat SDK config updated successfully",
"response": {
"updated": true,
"botId": "fb79920229d144608ebf665a10e50275"
}
}{
"status": "error",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "error",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "error",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}Chat SDK API
Update Chat Widget Config
Update Chat Widget visual customizations and settings for an agent
PUT
/
v1
/
agents
/
{botId}
/
chat-sdk-config
Update Chat Widget configuration
curl --request PUT \
--url https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-config \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"chatSdkConfig": {
"enabled": true,
"allowedOrigins": [
"<string>"
],
"windowCustomizations": {
"header": {
"title": "<string>",
"subtitle": "<string>",
"logo": "<string>",
"backgroundColor": "<string>",
"textColor": "<string>"
},
"body": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"userMessage": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"botMessage": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"footer": {
"backgroundColor": "<string>",
"textColor": "<string>",
"fontSize": "<string>",
"infoText": "<string>",
"input": {
"backgroundColor": "<string>",
"borderColor": "<string>",
"textColor": "<string>",
"placeholder": "<string>"
},
"button": {
"backgroundColor": "<string>",
"textColor": "<string>"
}
}
},
"widgetCustomizations": {
"buttonStyles": {
"backgroundColor": "<string>",
"width": "<string>",
"height": "<string>"
}
}
}
}
'import requests
url = "https://api.inya.ai/platform/v1/agents/{botId}/chat-sdk-config"
payload = { "chatSdkConfig": {
"enabled": True,
"allowedOrigins": ["<string>"],
"windowCustomizations": {
"header": {
"title": "<string>",
"subtitle": "<string>",
"logo": "<string>",
"backgroundColor": "<string>",
"textColor": "<string>"
},
"body": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"userMessage": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"botMessage": {
"backgroundColor": "<string>",
"fontSize": "<string>",
"textColor": "<string>"
},
"footer": {
"backgroundColor": "<string>",
"textColor": "<string>",
"fontSize": "<string>",
"infoText": "<string>",
"input": {
"backgroundColor": "<string>",
"borderColor": "<string>",
"textColor": "<string>",
"placeholder": "<string>"
},
"button": {
"backgroundColor": "<string>",
"textColor": "<string>"
}
}
},
"widgetCustomizations": { "buttonStyles": {
"backgroundColor": "<string>",
"width": "<string>",
"height": "<string>"
} }
} }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chatSdkConfig: {
enabled: true,
allowedOrigins: ['<string>'],
windowCustomizations: {
header: {
title: '<string>',
subtitle: '<string>',
logo: '<string>',
backgroundColor: '<string>',
textColor: '<string>'
},
body: JSON.stringify({backgroundColor: '<string>', fontSize: '<string>', textColor: '<string>'}),
userMessage: {backgroundColor: '<string>', fontSize: '<string>', textColor: '<string>'},
botMessage: {backgroundColor: '<string>', fontSize: '<string>', textColor: '<string>'},
footer: {
backgroundColor: '<string>',
textColor: '<string>',
fontSize: '<string>',
infoText: '<string>',
input: {
backgroundColor: '<string>',
borderColor: '<string>',
textColor: '<string>',
placeholder: '<string>'
},
button: {backgroundColor: '<string>', textColor: '<string>'}
}
},
widgetCustomizations: {
buttonStyles: {backgroundColor: '<string>', width: '<string>', height: '<string>'}
}
}
})
};
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": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Chat SDK config updated successfully",
"response": {
"updated": true,
"botId": "fb79920229d144608ebf665a10e50275"
}
}{
"status": "error",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "error",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}{
"status": "error",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "<string>"
}Overview
Update the visual customizations and settings for the Chat Widget embedded in your product. All fields are optional — only the fields you include are updated. Unspecified fields retain their current values. Requires theORG_ADMIN or DEVELOPER role. The QA role does not have write access to widget settings.
Required Permission
agents with ORG_ADMIN or DEVELOPER role
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
botId | string | Yes | Unique agent identifier. |
Request Body Fields
| Field | Type | Description |
|---|---|---|
chatSdkConfig.enabled | boolean | Enable or disable the Chat Widget. |
chatSdkConfig.allowedOrigins | string[] | Domains permitted to embed the widget (CORS whitelist). |
chatSdkConfig.windowCustomizations.header.title | string | Chat window title text. |
chatSdkConfig.windowCustomizations.header.subtitle | string | Subtitle text below the title. |
chatSdkConfig.windowCustomizations.header.logo | string | URL of the logo shown in the header. |
chatSdkConfig.windowCustomizations.header.backgroundColor | string | Header background color (hex, e.g. #1A73E8). |
chatSdkConfig.windowCustomizations.header.textColor | string | Header text color (hex). |
chatSdkConfig.windowCustomizations.body.backgroundColor | string | Chat transcript area background color. |
chatSdkConfig.windowCustomizations.body.fontSize | string | Transcript text font size (e.g. "14px"). |
chatSdkConfig.windowCustomizations.body.textColor | string | Transcript text color. |
chatSdkConfig.windowCustomizations.userMessage.backgroundColor | string | User message bubble background color. |
chatSdkConfig.windowCustomizations.userMessage.fontSize | string | User message font size. |
chatSdkConfig.windowCustomizations.userMessage.textColor | string | User message text color. |
chatSdkConfig.windowCustomizations.botMessage.backgroundColor | string | Agent message bubble background color. |
chatSdkConfig.windowCustomizations.botMessage.fontSize | string | Agent message font size. |
chatSdkConfig.windowCustomizations.botMessage.textColor | string | Agent message text color. |
chatSdkConfig.windowCustomizations.footer.backgroundColor | string | Footer background color. |
chatSdkConfig.windowCustomizations.footer.textColor | string | Footer text color. |
chatSdkConfig.windowCustomizations.footer.fontSize | string | Footer font size. |
chatSdkConfig.windowCustomizations.footer.infoText | string | Footer info text (e.g. "Powered by Inya"). |
chatSdkConfig.windowCustomizations.footer.input.backgroundColor | string | Text input field background color. |
chatSdkConfig.windowCustomizations.footer.input.borderColor | string | Text input field border color. |
chatSdkConfig.windowCustomizations.footer.input.textColor | string | Text input field text color. |
chatSdkConfig.windowCustomizations.footer.input.placeholder | string | Placeholder text in the input field. |
chatSdkConfig.windowCustomizations.footer.button.backgroundColor | string | Send button background color. |
chatSdkConfig.windowCustomizations.footer.button.textColor | string | Send button icon/text color. |
chatSdkConfig.widgetCustomizations.buttonStyles.backgroundColor | string | Launcher button background color. |
chatSdkConfig.widgetCustomizations.buttonStyles.width | string | Launcher button width (e.g. "60px"). |
chatSdkConfig.widgetCustomizations.buttonStyles.height | string | Launcher button height (e.g. "60px"). |
Example cURL
curl -X PUT "https://api.inya.ai/platform/v1/agents/fb79920229d144608ebf665a10e50275/chat-sdk-config" \
-H "x-api-key: <your_api_key>" \
-H "Content-Type: application/json" \
-d '{
"chatSdkConfig": {
"enabled": true,
"allowedOrigins": ["https://yourapp.example.com"],
"windowCustomizations": {
"header": {
"title": "Support Chat",
"subtitle": "How can we help?",
"backgroundColor": "#1A73E8",
"textColor": "#FFFFFF"
},
"body": {
"backgroundColor": "#F9FAFB",
"fontSize": "14px",
"textColor": "#111827"
},
"userMessage": {
"backgroundColor": "#1A73E8",
"textColor": "#FFFFFF",
"fontSize": "14px"
},
"botMessage": {
"backgroundColor": "#E5E7EB",
"textColor": "#111827",
"fontSize": "14px"
},
"footer": {
"backgroundColor": "#FFFFFF",
"infoText": "Powered by Inya",
"input": {
"placeholder": "Type your message..."
},
"button": {
"backgroundColor": "#1A73E8",
"textColor": "#FFFFFF"
}
}
},
"widgetCustomizations": {
"buttonStyles": {
"backgroundColor": "#1A73E8",
"width": "60px",
"height": "60px"
}
}
}
}'
Response
Success (200)
{
"status": "success",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Chat SDK config updated successfully",
"response": {
"updated": true,
"botId": "fb79920229d144608ebf665a10e50275"
}
}
Error Responses
403 Forbidden - Insufficient role{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "QA role does not have permission to update chat SDK configuration"
}
{
"status": "failure",
"requestId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"message": "Agent not found"
}
Use Cases
- Matching the chat widget to your brand colors and typography
- Customizing the widget for different agents (e.g. support vs. sales)
- Enabling or disabling the widget for a specific agent
- Restricting widget access to specific domains via
allowedOrigins
Use Get Chat Widget Config first to retrieve the current settings before making partial updates.
Save the
requestId from every response. You will need it if you contact Inya support to trace a specific request.Authorizations
API key with 'agents' permission
Path Parameters
Unique identifier of the agent
Body
application/json
Show child attributes
Show child attributes
Was this page helpful?
⌘I